Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linting using eslint with standard as the base #948

Merged
merged 9 commits into from
May 8, 2024
34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
extends: 'standard', // Maintain Standard.js rules
rules: {
'max-len': ['error', {
code: 120
}]
}
}

/*

This is the code to enforce agreed conventions

npm packages needed -
"eslint-plugin-require-sort": "^1.3.0",
"eslint-plugin-sort-keys": "^2.3.5",

module.exports = {
extends: 'standard', // Maintain Standard.js rules
// ignorePatterns: ['test/*'], // we can ignore patterns to allow to gradually enforce lints
plugins: ['sort-keys', 'require-sort'],
rules: {
'func-style': ['error', 'declaration'],
'max-len': ['error', {
code: 120
}],
'require-sort/require-sort': 'error',
'sort-keys': [
'error', 'asc', { caseSensitive: false }
]
}
}

*/
Loading
Loading