Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/framework/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class ServerlessFramework {
const { stdout: infoOutput } = await this.exec('serverless', ['info', '--verbose']);
try {
return YAML.load(infoOutput.toString())['Stack Outputs'];
} catch (e) {
} catch {
if (infoOutput.toString()) {
// Try to extract the section with `Stack Outputs` and parse it
// The regex below matches everything indented with 2 spaces below "Stack Outputs:"
Expand Down
15 changes: 13 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = [
importX.flatConfigs.recommended,
eslintConfigPrettier,
{
files: ['**/*.{cjs,js,mjs}'],
files: ['**/*.{cjs,js,mjs}', 'bin/serverless-compose'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'commonjs',
Expand All @@ -46,7 +46,12 @@ module.exports = [
},
],
'import-x/no-unresolved': ['error', { commonjs: true }],
'no-unused-vars': ['error', { caughtErrors: 'none' }],
'no-unused-vars': [
'error',
{
caughtErrors: 'all',
},
],
'n/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }],
'n/no-extraneous-require': 'off',
'n/no-unpublished-require': 'off',
Expand All @@ -56,6 +61,12 @@ module.exports = [
'n/hashbang': 'off',
},
},
{
files: ['bin/serverless-compose', 'components/**/*.js', 'src/**/*.js'],
rules: {
'n/no-unpublished-require': 'error',
},
},
{
files: ['**/*.mjs'],
languageOptions: {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"oslsc": "bin/serverless-compose"
},
"scripts": {
"lint": "eslint .",
"lint:updated": "pipe-git-updated --ext=cjs --ext=js --ext=mjs --base=main -- eslint",
"prettier-check": "prettier -c \"**/*.{cjs,css,html,js,json,md,mjs,yaml,yml}\"",
"prettier-check:updated": "pipe-git-updated --ext=cjs --ext=css --ext=html --ext=js --ext=json --ext=md --ext=mjs --ext=yaml --ext=yml --base=main -- prettier -c",
"prettify": "prettier --write \"**/*.{cjs,css,html,js,json,md,mjs,yaml,yml}\"",
"prettify:updated": "pipe-git-updated --ext=cjs --ext=css --ext=html --ext=js --ext=json --ext=md --ext=mjs --ext=yaml --ext=yml --base=main -- prettier --write",
"lint": "eslint . bin/serverless-compose",
"lint:updated": "pipe-git-updated --ext=cjs --ext=js --ext=mjs --base=main -- eslint && pipe-git-updated --base=main bin -- eslint",
"prettier-check": "prettier -c \"**/*.{cjs,css,html,js,json,md,mjs,yaml,yml}\" && prettier -c --parser babel bin/serverless-compose",
"prettier-check:updated": "pipe-git-updated --ext=cjs --ext=css --ext=html --ext=js --ext=json --ext=md --ext=mjs --ext=yaml --ext=yml --base=main -- prettier -c && pipe-git-updated --base=main bin -- prettier -c --parser=babel",
"prettify": "prettier --write \"**/*.{cjs,css,html,js,json,md,mjs,yaml,yml}\" && prettier --write --parser babel bin/serverless-compose",
"prettify:updated": "pipe-git-updated --ext=cjs --ext=css --ext=html --ext=js --ext=json --ext=md --ext=mjs --ext=yaml --ext=yml --base=main -- prettier --write && pipe-git-updated --base=main bin -- prettier --write --parser=babel",
"test": "mocha --config test/mocha/unit.cjs"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fs/fileExists.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const fileExists = curry(async (filePath) => {
try {
const stats = await fse.lstat(filePath);
return stats.isFile();
} catch (error) {
} catch {
return false;
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fs/fileExistsSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const fileExistsSync = (filePath) => {
try {
const stats = fse.lstatSync(filePath);
return stats.isFile();
} catch (e) {
} catch {
return false;
}
};
Expand Down