-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
7450627
commit ed8eb69
Showing
3 changed files
with
171 additions
and
126 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 |
---|---|---|
@@ -1,87 +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 [{ | ||
files: ['**/*.ts'], | ||
plugins: { | ||
'@typescript-eslint': typescriptEslint, | ||
unicorn, | ||
export default wdioEslint.config([ | ||
{ | ||
ignores: ['dist', 'example'] | ||
}, | ||
ignores: [ | ||
'node_modules/**', | ||
'dist/**', | ||
'build/**', | ||
'example/.nuxt/**', | ||
'example/.output/**', | ||
], | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
|
||
rules: { | ||
quotes: ['error', 'single', { | ||
avoidEscape: true, | ||
}], | ||
|
||
camelcase: ['error', { | ||
properties: 'never', | ||
}], | ||
|
||
semi: ['error', 'never'], | ||
indent: [2, 4], | ||
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-unused-vars': 'off', | ||
'no-undef': 'off', | ||
'no-redeclare': 'off', | ||
'dot-notation': 'off', | ||
|
||
'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', | ||
/** | ||
* custom test configuration | ||
*/ | ||
{ | ||
files: ['src/cjs/**/*'], | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
} | ||
} | ||
}] | ||
]) |
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
Oops, something went wrong.