eslint-config-gristow 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +0 -39
- package/package.json +1 -1
- package/svelte.eslintrc.js +59 -0
package/.eslintrc.js
CHANGED
|
@@ -16,45 +16,7 @@ module.exports = {
|
|
|
16
16
|
},
|
|
17
17
|
requireConfigFile: false,
|
|
18
18
|
},
|
|
19
|
-
extends: ['plugin:svelte/recommended'],
|
|
20
19
|
overrides: [
|
|
21
|
-
{
|
|
22
|
-
files: ['*.svelte'],
|
|
23
|
-
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
|
|
24
|
-
extends: ['airbnb-typescript/base'],
|
|
25
|
-
rules: {
|
|
26
|
-
...rules,
|
|
27
|
-
/**
|
|
28
|
-
* eslint-plugin-svelte3 has issues, basically, with any eslint fix that creates a
|
|
29
|
-
* multi-line fix. So, lots has to be disabled... even so, I'm sure I've missed some
|
|
30
|
-
* see https://github.com/sveltejs/eslint-plugin-svelte3/blob/master/OTHER_PLUGINS.md
|
|
31
|
-
*/
|
|
32
|
-
'import/first': 'off',
|
|
33
|
-
'import/no-cycle': 'off',
|
|
34
|
-
'import/no-duplicates': 'off',
|
|
35
|
-
'import/no-mutable-exports': 'off',
|
|
36
|
-
'import/no-unresolved': 'off',
|
|
37
|
-
'import/no-useless-path-segments': 'off',
|
|
38
|
-
// Prettier will add an empty line before end of </script> so this has to be off.
|
|
39
|
-
'no-multiple-empty-lines': 'off',
|
|
40
|
-
// Prettier will sometimes add a new line after =, so disable this:
|
|
41
|
-
'operator-linebreak': 'off',
|
|
42
|
-
'@typescript-eslint/indent': 'off',
|
|
43
|
-
'@typescript-eslint/no-var-requires': 'warn',
|
|
44
|
-
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
|
|
45
|
-
'no-useless-constructor': 'off',
|
|
46
|
-
// no-dupe-class-members should be removed when this PR lands:
|
|
47
|
-
// https://github.com/typescript-eslint/typescript-eslint/pull/1492
|
|
48
|
-
'no-dupe-class-members': 'off',
|
|
49
|
-
// So we can allow overloading, and list of class props defined
|
|
50
|
-
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
51
|
-
'@typescript-eslint/no-useless-constructor': 'error',
|
|
52
|
-
'tsdoc/syntax': 'warn',
|
|
53
|
-
// We get these via TS checking, and w/ import type we might have 2 entries,
|
|
54
|
-
// one for named, one for default, one for actual import.
|
|
55
|
-
'no-duplicate-imports': 'off',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
20
|
{
|
|
59
21
|
files: ['*.js'],
|
|
60
22
|
plugins: ['prettier', 'jsdoc'],
|
|
@@ -115,7 +77,6 @@ module.exports = {
|
|
|
115
77
|
jsdoc: {
|
|
116
78
|
mode: 'typescript',
|
|
117
79
|
},
|
|
118
|
-
'svelte/ignore-styles': () => true,
|
|
119
80
|
},
|
|
120
81
|
},
|
|
121
82
|
],
|
package/package.json
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// See https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.md for tslint-eslint rule migration
|
|
2
|
+
|
|
3
|
+
const rules = require('./shared-rules');
|
|
4
|
+
const prettierRules = require('./prettier-rules');
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
parser: '@babel/eslint-parser',
|
|
8
|
+
parserOptions: {
|
|
9
|
+
ecmaVersion: 2022,
|
|
10
|
+
project: ['./tsconfig.json'],
|
|
11
|
+
allowAutomaticSingleRunInference: true,
|
|
12
|
+
// Can I remove these now?
|
|
13
|
+
ecmaFeatures: {
|
|
14
|
+
impliedStrict: true,
|
|
15
|
+
classes: true,
|
|
16
|
+
},
|
|
17
|
+
requireConfigFile: false,
|
|
18
|
+
},
|
|
19
|
+
extends: ['plugin:svelte/recommended', './.eslintrc.js'],
|
|
20
|
+
overrides: [
|
|
21
|
+
{
|
|
22
|
+
files: ['*.svelte'],
|
|
23
|
+
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
|
|
24
|
+
extends: ['airbnb-typescript/base'],
|
|
25
|
+
rules: {
|
|
26
|
+
...rules,
|
|
27
|
+
/**
|
|
28
|
+
* eslint-plugin-svelte3 has issues, basically, with any eslint fix that creates a
|
|
29
|
+
* multi-line fix. So, lots has to be disabled... even so, I'm sure I've missed some
|
|
30
|
+
* see https://github.com/sveltejs/eslint-plugin-svelte3/blob/master/OTHER_PLUGINS.md
|
|
31
|
+
*/
|
|
32
|
+
'import/first': 'off',
|
|
33
|
+
'import/no-cycle': 'off',
|
|
34
|
+
'import/no-duplicates': 'off',
|
|
35
|
+
'import/no-mutable-exports': 'off',
|
|
36
|
+
'import/no-unresolved': 'off',
|
|
37
|
+
'import/no-useless-path-segments': 'off',
|
|
38
|
+
// Prettier will add an empty line before end of </script> so this has to be off.
|
|
39
|
+
'no-multiple-empty-lines': 'off',
|
|
40
|
+
// Prettier will sometimes add a new line after =, so disable this:
|
|
41
|
+
'operator-linebreak': 'off',
|
|
42
|
+
'@typescript-eslint/indent': 'off',
|
|
43
|
+
'@typescript-eslint/no-var-requires': 'warn',
|
|
44
|
+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
|
|
45
|
+
'no-useless-constructor': 'off',
|
|
46
|
+
// no-dupe-class-members should be removed when this PR lands:
|
|
47
|
+
// https://github.com/typescript-eslint/typescript-eslint/pull/1492
|
|
48
|
+
'no-dupe-class-members': 'off',
|
|
49
|
+
// So we can allow overloading, and list of class props defined
|
|
50
|
+
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
51
|
+
'@typescript-eslint/no-useless-constructor': 'error',
|
|
52
|
+
'tsdoc/syntax': 'warn',
|
|
53
|
+
// We get these via TS checking, and w/ import type we might have 2 entries,
|
|
54
|
+
// one for named, one for default, one for actual import.
|
|
55
|
+
'no-duplicate-imports': 'off',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|