Skip to content

Commit

Permalink
update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkhala committed May 5, 2024
1 parent 56a9381 commit b0fc0e7
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 74 deletions.
73 changes: 0 additions & 73 deletions .eslintrc.json

This file was deleted.

137 changes: 137 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import globals from 'globals';
import js from '@eslint/js';

export default [
js.configs.recommended,
{
rules: {
'array-bracket-spacing': [
'error',
'never'
],
'arrow-spacing': [
'error'
],
'brace-style': [
'error'
],
'comma-spacing': [
'error'
],
'curly': [
'error'
],
'dot-notation': [
'error'
],
'eqeqeq': [
'error'
],
'indent': [
'error',
'tab',
{
'SwitchCase': 1
}
],
'keyword-spacing': [
'error'
],
'linebreak-style': [
'error',
'unix'
],
'max-len': [
'error',
{
'code': 150,
'ignoreTrailingComments': true,
'ignoreUrls': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
'ignoreRegExpLiterals': true
}
],
'no-console': [
'warn'
],
'no-mixed-spaces-and-tabs': [
'error'
],
'no-shadow': [
'error'
],
'no-throw-literal': [
'error'
],
'no-trailing-spaces': [
'error'
],
'no-useless-call': [
'error'
],
'no-unused-vars': [
'error',
{
'args': 'none'
}
],
'no-var': [
'error'
],
'no-with': [
'error'
],
'object-curly-spacing': [
'error',
'never'
],
'operator-linebreak': [
'error'
],
'prefer-arrow-callback': [
'error'
],
'prefer-const': [
'error'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
],
'spaced-comment': [
'error',
'always'
],
'space-before-blocks': [
'error',
{
'functions': 'always',
'keywords': 'always',
'classes': 'always'
}
],
'space-infix-ops': [
'error'
],
'space-in-parens': [
'error',
'never'
],
'yoda': [
'error'
]
},
languageOptions: {
ecmaVersion: 2023,
sourceType: 'module',
globals: {
...globals.mocha, ...globals.es2021, ...globals.node
}
}
}
];
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"prestart": "mocha dockerode-bootstrap.js --grep ^up --bail",
"start": "mocha app/channelSetup.js",
"post-start": "mocha ./cc/golang/diagnose/install.js",
"nodejscc": "mocha ./cc/node/diagnose/install.js",
"stop": "mocha dockerode-bootstrap.js --grep ^down"
},
"license": "Apache-2.0",
Expand Down

0 comments on commit b0fc0e7

Please sign in to comment.