-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal: adopt new internal eslint package
- Loading branch information
1 parent
574e3b6
commit 73f5def
Showing
13 changed files
with
1,083 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ root = true | |
[*] | ||
|
||
indent_style = space | ||
indent_size = 2 | ||
indent_size = 4 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,17 @@ | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin' | ||
import unicorn from 'eslint-plugin-unicorn' | ||
import globals from 'globals' | ||
import tsParser from '@typescript-eslint/parser' | ||
import wdioEslint from '@wdio/eslint' | ||
|
||
export default [{ | ||
plugins: { | ||
'@typescript-eslint': typescriptEslint, | ||
unicorn, | ||
}, | ||
ignores: ['node_modules/**', 'dist/**', 'build/**'], | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
export default wdioEslint.config([ | ||
{ | ||
ignores: ['dist'] | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
|
||
rules: { | ||
quotes: ['error', 'single', { | ||
avoidEscape: true, | ||
}], | ||
|
||
camelcase: ['error', { | ||
properties: 'never', | ||
}], | ||
|
||
semi: ['error', 'never'], | ||
indent: [2, 2], | ||
eqeqeq: ['error', 'always'], | ||
'prefer-const': 'error', | ||
|
||
'no-multiple-empty-lines': [2, { | ||
max: 1, | ||
maxEOF: 1, | ||
}], | ||
|
||
'array-bracket-spacing': ['error', 'never'], | ||
|
||
'brace-style': ['error', '1tbs', { | ||
allowSingleLine: true, | ||
}], | ||
|
||
'comma-spacing': ['error', { | ||
before: false, | ||
after: true, | ||
}], | ||
|
||
'no-lonely-if': 'error', | ||
'dot-notation': 'error', | ||
'no-else-return': 'error', | ||
'no-tabs': 'error', | ||
|
||
'no-trailing-spaces': ['error', { | ||
skipBlankLines: false, | ||
ignoreComments: false, | ||
}], | ||
|
||
'no-var': 'error', | ||
'unicode-bom': ['error', 'never'], | ||
curly: ['error', 'all'], | ||
'object-curly-spacing': ['error', 'always'], | ||
'keyword-spacing': ['error'], | ||
'require-atomic-updates': 0, | ||
'linebreak-style': ['error', 'unix'], | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'unicorn/prefer-node-protocol': ['error'], | ||
'no-restricted-syntax': ['error', 'IfStatement > ExpressionStatement > AssignmentExpression'], | ||
'unicorn/prefer-ternary': 'error', | ||
}, | ||
}, { | ||
files: ['**/*.ts'], | ||
ignores: ['node_modules/**', 'dist/**', 'build/**'], | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'no-undef': 'off', | ||
'no-redeclare': 'off', | ||
'dot-notation': 'off', | ||
}, | ||
}] | ||
/** | ||
* custom test configuration | ||
*/ | ||
{ | ||
files: ['tests/**/*'], | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
} | ||
} | ||
]) |
Oops, something went wrong.