Skip to content

Commit 0f5fe65

Browse files
authored
use common linting configuration (sveltejs#4942)
1 parent dba6e5e commit 0f5fe65

File tree

5 files changed

+925
-331
lines changed

5 files changed

+925
-331
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
**/expected.js
33
_output
44
test/*/samples/*/output.js
5-
node_modules
65

76
# automatically generated
87
internal_exports.ts

.eslintrc.js

Lines changed: 2 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,6 @@
11
module.exports = {
22
root: true,
3-
rules: {
4-
indent: 'off',
5-
'no-unused-vars': 'off',
6-
semi: [2, 'always'],
7-
'keyword-spacing': [2, { before: true, after: true }],
8-
'space-before-blocks': [2, 'always'],
9-
'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
10-
'no-cond-assign': 0,
11-
'object-shorthand': [2, 'always'],
12-
'no-const-assign': 2,
13-
'no-class-assign': 2,
14-
'no-this-before-super': 2,
15-
'no-var': 2,
16-
'no-unreachable': 2,
17-
'valid-typeof': 2,
18-
'quote-props': [2, 'as-needed'],
19-
'one-var': [2, 'never'],
20-
'prefer-arrow-callback': 2,
21-
'prefer-const': [2, { destructuring: 'all' }],
22-
'arrow-spacing': 2,
23-
'no-inner-declarations': 0,
24-
'require-atomic-updates': 'off',
25-
'@typescript-eslint/indent': 'off',
26-
'@typescript-eslint/camelcase': 'off',
27-
'@typescript-eslint/no-use-before-define': 'off',
28-
'@typescript-eslint/array-type': ['error', 'array-simple'],
29-
'@typescript-eslint/explicit-function-return-type': 'off',
30-
'@typescript-eslint/no-explicit-any': 'off',
31-
'@typescript-eslint/explicit-member-accessibility': 'off',
32-
'@typescript-eslint/no-unused-vars': [
33-
'error',
34-
{
35-
argsIgnorePattern: '^_'
36-
}
37-
],
38-
'@typescript-eslint/no-object-literal-type-assertion': 'off',
39-
'@typescript-eslint/no-unused-vars': 'off',
40-
'@typescript-eslint/prefer-interface': 'off'
41-
},
42-
globals: {
43-
globalThis: false
44-
},
45-
env: {
46-
es6: true,
47-
browser: true,
48-
node: true,
49-
mocha: true
50-
},
51-
extends: [
52-
'eslint:recommended',
53-
'plugin:import/errors',
54-
'plugin:import/warnings',
55-
'plugin:import/typescript',
56-
'plugin:@typescript-eslint/recommended'
57-
],
58-
parserOptions: {
59-
ecmaVersion: 9,
60-
sourceType: 'module'
61-
},
62-
plugins: ['svelte3'],
3+
extends: '@sveltejs',
634
settings: {
645
'import/core-modules': [
656
'svelte',
@@ -69,20 +10,5 @@ module.exports = {
6910
'estree'
7011
],
7112
'svelte3/compiler': require('./compiler')
72-
},
73-
overrides: [
74-
{
75-
files: ['*.js'],
76-
rules: {
77-
'@typescript-eslint/no-var-requires': 'off'
78-
}
79-
},
80-
{
81-
files: ['*.svelte'],
82-
processor: 'svelte3/svelte3',
83-
rules: {
84-
'@typescript-eslint/indent': 'off'
85-
}
86-
}
87-
]
13+
}
8814
};

0 commit comments

Comments
 (0)