Skip to content

Commit 025eed1

Browse files
committed
fix ESLint and eslint-plugin-svelte3 stuff
1 parent 83be1f3 commit 025eed1

8 files changed

+158
-138
lines changed

.eslintrc.js

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
module.exports = {
2+
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': [
26+
'error',
27+
'tab',
28+
{
29+
SwitchCase: 1,
30+
ignoredNodes: ['TemplateLiteral']
31+
}
32+
],
33+
'@typescript-eslint/camelcase': 'off',
34+
'@typescript-eslint/no-use-before-define': 'off',
35+
'@typescript-eslint/array-type': ['error', 'array-simple'],
36+
'@typescript-eslint/explicit-function-return-type': 'off',
37+
'@typescript-eslint/no-explicit-any': 'off',
38+
'@typescript-eslint/explicit-member-accessibility': 'off',
39+
'@typescript-eslint/no-unused-vars': [
40+
'error',
41+
{
42+
argsIgnorePattern: '^_'
43+
}
44+
],
45+
'@typescript-eslint/no-object-literal-type-assertion': [
46+
'error',
47+
{
48+
allowAsParameter: true
49+
}
50+
],
51+
'@typescript-eslint/no-unused-vars': 'off'
52+
},
53+
globals: {
54+
globalThis: false
55+
},
56+
env: {
57+
es6: true,
58+
browser: true,
59+
node: true,
60+
mocha: true
61+
},
62+
extends: [
63+
'eslint:recommended',
64+
'plugin:import/errors',
65+
'plugin:import/warnings',
66+
'plugin:import/typescript',
67+
'plugin:@typescript-eslint/recommended'
68+
],
69+
parserOptions: {
70+
ecmaVersion: 9,
71+
sourceType: 'module'
72+
},
73+
plugins: ['svelte3'],
74+
settings: {
75+
'import/core-modules': [
76+
'svelte',
77+
'svelte/internal',
78+
'svelte/store',
79+
'svelte/easing',
80+
'estree'
81+
],
82+
'svelte3/compiler': require('./compiler')
83+
},
84+
overrides: [
85+
{
86+
files: ['*.js'],
87+
rules: {
88+
'@typescript-eslint/no-var-requires': 'off'
89+
}
90+
},
91+
{
92+
files: ['*.svelte'],
93+
processor: 'svelte3/svelte3',
94+
rules: {
95+
'@typescript-eslint/indent': 'off'
96+
}
97+
}
98+
]
99+
};

.eslintrc.json

-80
This file was deleted.

package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"css-tree": "1.0.0-alpha22",
6969
"eslint": "^6.0.1",
7070
"eslint-plugin-import": "^2.18.0",
71+
"eslint-plugin-svelte3": "^2.6.0",
7172
"estree-walker": "^0.6.1",
7273
"is-reference": "^1.1.1",
7374
"jsdom": "^12.2.0",

site/.eslintrc.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
root: true,
3+
rules: {
4+
indent: [2, 'tab', { SwitchCase: 1 }],
5+
semi: [2, 'always'],
6+
'keyword-spacing': [2, { before: true, after: true }],
7+
'space-before-blocks': [2, 'always'],
8+
'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
9+
'no-cond-assign': 0,
10+
'no-unused-vars': 2,
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': 0
25+
},
26+
env: {
27+
es6: true,
28+
browser: true,
29+
node: true,
30+
mocha: true
31+
},
32+
extends: [
33+
'eslint:recommended',
34+
'plugin:import/errors',
35+
'plugin:import/warnings'
36+
],
37+
plugins: ['svelte3'],
38+
overrides: [
39+
{
40+
files: ['*.svelte'],
41+
processor: 'svelte3/svelte3'
42+
}
43+
],
44+
parserOptions: {
45+
ecmaVersion: 9,
46+
sourceType: 'module'
47+
},
48+
settings: {
49+
'import/core-modules': ['svelte'],
50+
'svelte3/compiler': require('svelte/compiler')
51+
}
52+
};

site/.eslintrc.json

-51
This file was deleted.

site/package-lock.json

-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"@sveltejs/svelte-repl": "^0.1.8",
3939
"degit": "^2.1.3",
4040
"dotenv": "^8.0.0",
41-
"eslint-plugin-svelte3": "^2.5.0",
4241
"esm": "^3.2.22",
4342
"jimp": "^0.6.0",
4443
"mocha": "^6.1.3",

0 commit comments

Comments
 (0)