Skip to content

Commit

Permalink
internal: adopt new internal eslint package
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 18, 2024
1 parent 574e3b6 commit 73f5def
Show file tree
Hide file tree
Showing 13 changed files with 1,083 additions and 1,087 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ root = true
[*]

indent_style = space
indent_size = 2
indent_size = 4

end_of_line = lf
charset = utf-8
Expand Down
98 changes: 15 additions & 83 deletions eslint.config.mjs
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'
}
}
])
Loading

0 comments on commit 73f5def

Please sign in to comment.