@luxass/eslint-config 1.0.7 → 2.0.0
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/README.md +15 -2
- package/package.json +15 -17
- package/src/javascript.js +91 -91
- package/src/typescript.js +90 -95
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "luxass' ESLint config",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Norgaard",
|
|
7
7
|
"email": "lucasnrgaard@gmail.com",
|
|
@@ -23,34 +23,32 @@
|
|
|
23
23
|
"src"
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"eslint": "^8.
|
|
26
|
+
"eslint": "^8.29.0",
|
|
27
|
+
"typescript": "^4.9.4"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
30
|
-
"@typescript-eslint/parser": "^5.
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
31
|
+
"@typescript-eslint/parser": "^5.46.0",
|
|
31
32
|
"eslint-config-standard": "^17.0.0",
|
|
32
33
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
33
34
|
"eslint-plugin-import": "^2.26.0",
|
|
34
|
-
"eslint-plugin-jsonc": "^2.
|
|
35
|
+
"eslint-plugin-jsonc": "^2.5.0",
|
|
35
36
|
"eslint-plugin-markdown": "^3.0.0",
|
|
36
|
-
"eslint-plugin-n": "^15.
|
|
37
|
-
"eslint-plugin-promise": "^6.
|
|
38
|
-
"eslint-plugin-react": "^7.
|
|
39
|
-
"eslint-plugin-unicorn": "^
|
|
40
|
-
"eslint-plugin-yml": "^1.
|
|
37
|
+
"eslint-plugin-n": "^15.6.0",
|
|
38
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
39
|
+
"eslint-plugin-react": "^7.31.11",
|
|
40
|
+
"eslint-plugin-unicorn": "^45.0.1",
|
|
41
|
+
"eslint-plugin-yml": "^1.3.0",
|
|
41
42
|
"jsonc-eslint-parser": "^2.1.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"prettier": "^2.7.1",
|
|
48
|
-
"typescript": "^4.7.4"
|
|
45
|
+
"bumpp": "^8.2.1",
|
|
46
|
+
"eslint": "^8.29.0",
|
|
47
|
+
"typescript": "^4.9.4"
|
|
49
48
|
},
|
|
50
49
|
"scripts": {
|
|
51
50
|
"bump": "bumpp package.json --commit --push --tag",
|
|
52
51
|
"release": "pnpm -r publish --access public",
|
|
53
|
-
"format": "prettier --write --cache .",
|
|
54
52
|
"lint": "eslint --cache src/**/*.js"
|
|
55
53
|
}
|
|
56
54
|
}
|
package/src/javascript.js
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
rules: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
semi: [
|
|
9
|
-
quotes: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
camelcase:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
indent: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
3
|
+
"import/order": "error",
|
|
4
|
+
"import/first": "error",
|
|
5
|
+
"import/no-mutable-exports": "error",
|
|
6
|
+
"import/no-unresolved": "off",
|
|
7
|
+
"import/no-absolute-path": "off",
|
|
8
|
+
semi: ["warn", "always"],
|
|
9
|
+
quotes: ["error", "double"],
|
|
10
|
+
"quote-props": ["warn", "as-needed"],
|
|
11
|
+
"no-unused-vars": "warn",
|
|
12
|
+
"no-param-reassign": "off",
|
|
13
|
+
"array-bracket-spacing": ["error", "never"],
|
|
14
|
+
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
15
|
+
"block-spacing": ["error", "always"],
|
|
16
|
+
camelcase: "off",
|
|
17
|
+
"comma-spacing": ["error", { before: false, after: true }],
|
|
18
|
+
"comma-style": ["error", "last"],
|
|
19
|
+
"comma-dangle": ["error", "only-multiline"],
|
|
20
|
+
"no-constant-condition": "warn",
|
|
21
|
+
"no-debugger": "error",
|
|
22
|
+
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
23
|
+
"no-cond-assign": ["error", "always"],
|
|
24
|
+
"func-call-spacing": ["off", "never"],
|
|
25
|
+
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
26
|
+
indent: ["error", 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
|
|
27
|
+
"no-restricted-syntax": ["error", "DebuggerStatement", "LabeledStatement", "WithStatement"],
|
|
28
|
+
"object-curly-spacing": ["error", "always"],
|
|
29
|
+
"no-return-await": "off",
|
|
30
|
+
"space-before-function-paren": [
|
|
31
|
+
"error",
|
|
32
32
|
{
|
|
33
|
-
anonymous:
|
|
34
|
-
named:
|
|
35
|
-
asyncArrow:
|
|
33
|
+
anonymous: "always",
|
|
34
|
+
named: "never",
|
|
35
|
+
asyncArrow: "always"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
// "no-multiple-empty-lines": ["warn", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
"no-multiple-empty-lines": "off",
|
|
40
|
+
"no-var": "error",
|
|
41
|
+
"prefer-const": [
|
|
42
|
+
"error",
|
|
43
43
|
{
|
|
44
|
-
destructuring:
|
|
44
|
+
destructuring: "any",
|
|
45
45
|
ignoreReadBeforeAssign: true
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
"prefer-arrow-callback": [
|
|
49
|
+
"error",
|
|
50
50
|
{
|
|
51
51
|
allowNamedFunctions: false,
|
|
52
52
|
allowUnboundThis: true
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
"object-shorthand": [
|
|
56
|
+
"error",
|
|
57
|
+
"always",
|
|
58
58
|
{
|
|
59
59
|
ignoreConstructors: false,
|
|
60
60
|
avoidQuotes: true
|
|
61
61
|
}
|
|
62
62
|
],
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
"prefer-exponentiation-operator": "error",
|
|
64
|
+
"prefer-rest-params": "error",
|
|
65
|
+
"prefer-spread": "error",
|
|
66
|
+
"prefer-template": "error",
|
|
67
|
+
"template-curly-spacing": "error",
|
|
68
|
+
"generator-star-spacing": "off",
|
|
69
|
+
"spaced-comment": [
|
|
70
|
+
"error",
|
|
71
|
+
"always",
|
|
72
72
|
{
|
|
73
73
|
line: {
|
|
74
|
-
markers: [
|
|
75
|
-
exceptions: [
|
|
74
|
+
markers: ["/"],
|
|
75
|
+
exceptions: ["/", "#"]
|
|
76
76
|
},
|
|
77
77
|
block: {
|
|
78
|
-
markers: [
|
|
79
|
-
exceptions: [
|
|
78
|
+
markers: ["!"],
|
|
79
|
+
exceptions: ["*"],
|
|
80
80
|
balanced: true
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
],
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
complexity: [
|
|
88
|
-
eqeqeq: [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
84
|
+
"array-callback-return": "error",
|
|
85
|
+
"block-scoped-var": "error",
|
|
86
|
+
"consistent-return": "off",
|
|
87
|
+
complexity: ["off", 11],
|
|
88
|
+
eqeqeq: ["error", "smart"],
|
|
89
|
+
"no-alert": "warn",
|
|
90
|
+
"no-case-declarations": "error",
|
|
91
|
+
"no-multi-spaces": "error",
|
|
92
|
+
"no-multi-str": "error",
|
|
93
|
+
"no-with": "error",
|
|
94
|
+
"no-void": "error",
|
|
95
|
+
"no-useless-escape": "off",
|
|
96
|
+
"vars-on-top": "error",
|
|
97
|
+
"require-await": "off",
|
|
98
|
+
"no-return-assign": "off",
|
|
99
|
+
"operator-linebreak": ["error", "before"],
|
|
100
|
+
"unicorn/error-message": "error",
|
|
101
|
+
"unicorn/escape-case": "error",
|
|
102
|
+
"unicorn/no-instanceof-array": "error",
|
|
103
|
+
"unicorn/no-new-buffer": "error",
|
|
104
|
+
"unicorn/no-unsafe-regex": "off",
|
|
105
|
+
"unicorn/number-literal-case": "error",
|
|
106
|
+
"unicorn/prefer-includes": "error",
|
|
107
|
+
"unicorn/prefer-starts-ends-with": "error",
|
|
108
|
+
"unicorn/prefer-text-content": "error",
|
|
109
|
+
"unicorn/prefer-type-error": "error",
|
|
110
|
+
"unicorn/throw-new-error": "error",
|
|
111
|
+
"no-use-before-define": ["error", { functions: false, classes: false, variables: true }],
|
|
112
|
+
"eslint-comments/disable-enable-pair": "off",
|
|
113
|
+
"import/no-named-as-default-member": "off",
|
|
114
|
+
"import/no-named-as-default": "off",
|
|
115
|
+
"import/namespace": "off",
|
|
116
|
+
"n/no-callback-literal": "off",
|
|
117
|
+
"sort-imports": [
|
|
118
|
+
"error",
|
|
119
119
|
{
|
|
120
120
|
ignoreCase: false,
|
|
121
121
|
ignoreDeclarationSort: true,
|
|
122
122
|
ignoreMemberSort: false,
|
|
123
|
-
memberSyntaxSortOrder: [
|
|
123
|
+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
124
124
|
allowSeparatedGroups: false
|
|
125
125
|
}
|
|
126
126
|
]
|
package/src/typescript.js
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
"plugin:import/typescript",
|
|
4
|
+
"plugin:@typescript-eslint/recommended",
|
|
5
|
+
"plugin:react/recommended"
|
|
6
6
|
],
|
|
7
7
|
settings: {
|
|
8
|
-
|
|
9
|
-
node: { extensions: [
|
|
8
|
+
"import/resolver": {
|
|
9
|
+
node: { extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"] }
|
|
10
10
|
},
|
|
11
11
|
react: {
|
|
12
|
-
version:
|
|
12
|
+
version: "17.0"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
rules: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
|
26
|
-
'no-useless-constructor': 'off',
|
|
27
|
-
indent: 'off',
|
|
28
|
-
'@typescript-eslint/indent': [
|
|
29
|
-
'error',
|
|
16
|
+
"import/named": "off",
|
|
17
|
+
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
|
|
18
|
+
"@typescript-eslint/member-delimiter-style": "warn",
|
|
19
|
+
"@typescript-eslint/type-annotation-spacing": ["error", {}],
|
|
20
|
+
"@typescript-eslint/consistent-type-imports": "warn",
|
|
21
|
+
"no-useless-constructor": "off",
|
|
22
|
+
indent: "off",
|
|
23
|
+
"@typescript-eslint/indent": [
|
|
24
|
+
"error",
|
|
30
25
|
2,
|
|
31
26
|
{
|
|
32
27
|
SwitchCase: 1,
|
|
@@ -42,93 +37,93 @@ module.exports = {
|
|
|
42
37
|
flatTernaryExpressions: false,
|
|
43
38
|
ignoreComments: false,
|
|
44
39
|
ignoredNodes: [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
40
|
+
"TemplateLiteral *",
|
|
41
|
+
"JSXElement",
|
|
42
|
+
"JSXElement > *",
|
|
43
|
+
"JSXAttribute",
|
|
44
|
+
"JSXIdentifier",
|
|
45
|
+
"JSXNamespacedName",
|
|
46
|
+
"JSXMemberExpression",
|
|
47
|
+
"JSXSpreadAttribute",
|
|
48
|
+
"JSXExpressionContainer",
|
|
49
|
+
"JSXOpeningElement",
|
|
50
|
+
"JSXClosingElement",
|
|
51
|
+
"JSXFragment",
|
|
52
|
+
"JSXOpeningFragment",
|
|
53
|
+
"JSXClosingFragment",
|
|
54
|
+
"JSXText",
|
|
55
|
+
"JSXEmptyExpression",
|
|
56
|
+
"JSXSpreadChild",
|
|
57
|
+
"TSTypeParameterInstantiation"
|
|
63
58
|
],
|
|
64
59
|
offsetTernaryExpressions: true
|
|
65
60
|
}
|
|
66
61
|
],
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
"no-unused-vars": "off",
|
|
63
|
+
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
64
|
+
"no-redeclare": "off",
|
|
65
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
66
|
+
"no-use-before-define": "off",
|
|
67
|
+
"@typescript-eslint/no-use-before-define": [
|
|
68
|
+
"error",
|
|
74
69
|
{ functions: false, classes: false, variables: true }
|
|
75
70
|
],
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
semi:
|
|
83
|
-
|
|
84
|
-
quotes:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
71
|
+
"brace-style": "off",
|
|
72
|
+
"@typescript-eslint/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
73
|
+
"comma-dangle": "off",
|
|
74
|
+
"@typescript-eslint/comma-dangle": ["error", "only-multiline"],
|
|
75
|
+
"object-curly-spacing": "off",
|
|
76
|
+
"@typescript-eslint/object-curly-spacing": ["error", "always"],
|
|
77
|
+
semi: "off",
|
|
78
|
+
"@typescript-eslint/semi": ["warn", "always"],
|
|
79
|
+
quotes: "off",
|
|
80
|
+
"@typescript-eslint/quotes": ["warn", "double"],
|
|
81
|
+
"space-before-blocks": "off",
|
|
82
|
+
"@typescript-eslint/space-before-blocks": ["error", "always"],
|
|
83
|
+
"space-before-function-paren": "off",
|
|
84
|
+
"@typescript-eslint/space-before-function-paren": [
|
|
85
|
+
"error",
|
|
91
86
|
{
|
|
92
|
-
anonymous:
|
|
93
|
-
named:
|
|
94
|
-
asyncArrow:
|
|
87
|
+
anonymous: "always",
|
|
88
|
+
named: "never",
|
|
89
|
+
asyncArrow: "always"
|
|
95
90
|
}
|
|
96
91
|
],
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
"space-infix-ops": "off",
|
|
93
|
+
"@typescript-eslint/space-infix-ops": "error",
|
|
94
|
+
"keyword-spacing": "off",
|
|
95
|
+
"@typescript-eslint/keyword-spacing": ["error", { before: true, after: true }],
|
|
96
|
+
"comma-spacing": "off",
|
|
97
|
+
"@typescript-eslint/comma-spacing": ["error", { before: false, after: true }],
|
|
98
|
+
"no-extra-parens": "off",
|
|
99
|
+
"@typescript-eslint/no-extra-parens": ["error", "functions"],
|
|
100
|
+
"no-dupe-class-members": "off",
|
|
101
|
+
"@typescript-eslint/no-dupe-class-members": "error",
|
|
102
|
+
"no-loss-of-precision": "off",
|
|
103
|
+
"@typescript-eslint/no-loss-of-precision": "error",
|
|
104
|
+
"lines-between-class-members": "off",
|
|
105
|
+
"@typescript-eslint/lines-between-class-members": [
|
|
106
|
+
"error",
|
|
107
|
+
"always",
|
|
113
108
|
{ exceptAfterSingleLine: true }
|
|
114
109
|
],
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
110
|
+
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
111
|
+
"@typescript-eslint/naming-convention": "off",
|
|
112
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
113
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
114
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
115
|
+
"@typescript-eslint/parameter-properties": "off",
|
|
116
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
117
|
+
"@typescript-eslint/ban-ts-ignore": "off",
|
|
118
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
119
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
120
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
121
|
+
"@typescript-eslint/ban-types": "off",
|
|
122
|
+
"@typescript-eslint/no-namespace": "off",
|
|
123
|
+
"@typescript-eslint/triple-slash-reference": "off",
|
|
129
124
|
|
|
130
125
|
// REACT
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
"jsx-quotes": ["warn", "prefer-double"],
|
|
127
|
+
"react/react-in-jsx-scope": "off"
|
|
133
128
|
}
|
|
134
129
|
};
|