neatlint 1.0.0 → 1.0.2
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 +4 -7
- package/dist/defaults/NeatlintOptions.default.js +5 -8
- package/dist/defaults/NeatlintOptions.default.mjs +7 -10
- package/dist/main.js +5 -8
- package/dist/main.mjs +9 -12
- package/dist/utils/Neatlint.util.js +5 -8
- package/dist/utils/Neatlint.util.mjs +9 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -175,16 +175,16 @@ Neatlint offers strict ESLint settings.
|
|
|
175
175
|
| Rule | Description |
|
|
176
176
|
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
177
177
|
| [arrow-body-style](https://eslint.org/docs/latest/rules/arrow-body-style) | Require braces around arrow function bodies. |
|
|
178
|
-
| [comma-dangle](https://eslint.org/docs/latest/rules/comma-dangle) | Require or disallow trailing commas. |
|
|
179
178
|
| [func-style](https://eslint.org/docs/latest/rules/func-style) | Enforce the consistent use of either function declarations or expressions assigned to variables. |
|
|
180
179
|
| [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports) | Disallow duplicate module imports. |
|
|
181
180
|
| [no-empty](https://eslint.org/docs/latest/rules/no-empty) | Disallow empty block statements. |
|
|
182
|
-
| [no-multi-spaces](https://eslint.org/docs/latest/rules/no-multi-spaces) | Disallow multiple spaces. |
|
|
183
|
-
| [no-multiple-empty-lines](https://eslint.org/docs/latest/rules/no-multiple-empty-lines) | Disallow multiple empty lines. |
|
|
184
181
|
| [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax) | Disallow specified syntax. |
|
|
185
|
-
| [no-
|
|
182
|
+
| [no-useless-backreference](https://eslint.org/docs/latest/rules/no-useless-backreference) | Disallow useless backreferences in regular expressions. |
|
|
183
|
+
| [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key) | Disallow unnecessary computed property keys in objects and classes. |
|
|
186
184
|
| [no-useless-catch](https://eslint.org/docs/latest/rules/no-useless-catch) | Disallow unnecessary catch clauses. |
|
|
185
|
+
| [no-useless-concat](https://eslint.org/docs/latest/rules/no-useless-concat) | Disallow unnecessary concatenation of literals or template literals. |
|
|
187
186
|
| [no-useless-constructor](https://eslint.org/docs/latest/rules/no-useless-constructor) | Disallow unnecessary constructors. |
|
|
187
|
+
| [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape) | Disallow unnecessary escape characters. |
|
|
188
188
|
| [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename) | Disallow renaming import, export, and destructured assignments to the same name. |
|
|
189
189
|
| [no-useless-return](https://eslint.org/docs/latest/rules/no-useless-return) | Disallow redundant return statements. |
|
|
190
190
|
| [no-var](https://eslint.org/docs/latest/rules/no-var) | Require let or const instead of var. |
|
|
@@ -192,10 +192,7 @@ Neatlint offers strict ESLint settings.
|
|
|
192
192
|
| [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback) | Require using arrow functions for callbacks. |
|
|
193
193
|
| [prefer-const](https://eslint.org/docs/latest/rules/prefer-const) | Require const declarations for variables that are never reassigned after declared. |
|
|
194
194
|
| [prefer-template](https://eslint.org/docs/latest/rules/prefer-template) | Require template literals instead of string concatenation. |
|
|
195
|
-
| [quote-props](https://eslint.org/docs/latest/rules/quote-props) | Require quotes around object literal property names. |
|
|
196
195
|
| [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq) | Require the use of === and !==. |
|
|
197
|
-
| [indent](https://eslint.org/docs/latest/rules/indent) | Enforce consistent indentation. |
|
|
198
|
-
| [quotes](https://eslint.org/docs/latest/rules/quotes) | Enforce the consistent use of either backticks, double, or single quotes. |
|
|
199
196
|
| [@typescript-eslint/consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions) | Enforce type definitions to consistently use either interface or type. |
|
|
200
197
|
| [@typescript-eslint/consistent-type-exports](https://typescript-eslint.io/rules/consistent-type-exports) | Enforce consistent usage of type exports. |
|
|
201
198
|
| [@typescript-eslint/consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports) | Enforce consistent usage of type imports. |
|
|
@@ -63,16 +63,16 @@ var NeatlintOptionsDefault = {
|
|
|
63
63
|
plugins: {},
|
|
64
64
|
rules: {
|
|
65
65
|
"arrow-body-style": "error",
|
|
66
|
-
"comma-dangle": "error",
|
|
67
66
|
"func-style": ["error", "expression", { allowArrowFunctions: true }],
|
|
68
67
|
"no-duplicate-imports": "error",
|
|
69
68
|
"no-empty": "error",
|
|
70
|
-
"no-multi-spaces": "error",
|
|
71
|
-
"no-multiple-empty-lines": ["error", { max: 1 }],
|
|
72
69
|
"no-restricted-syntax": ["error", "SwitchStatement"],
|
|
73
|
-
"no-
|
|
70
|
+
"no-useless-backreference": "error",
|
|
74
71
|
"no-useless-catch": "error",
|
|
72
|
+
"no-useless-computed-key": "error",
|
|
73
|
+
"no-useless-concat": "error",
|
|
75
74
|
"no-useless-constructor": "error",
|
|
75
|
+
"no-useless-escape": "error",
|
|
76
76
|
"no-useless-rename": "error",
|
|
77
77
|
"no-useless-return": "error",
|
|
78
78
|
"no-var": "error",
|
|
@@ -80,10 +80,7 @@ var NeatlintOptionsDefault = {
|
|
|
80
80
|
"prefer-arrow-callback": "error",
|
|
81
81
|
"prefer-const": "error",
|
|
82
82
|
"prefer-template": "error",
|
|
83
|
-
|
|
84
|
-
eqeqeq: "error",
|
|
85
|
-
indent: ["error", 2],
|
|
86
|
-
quotes: ["error", "double"]
|
|
83
|
+
eqeqeq: "error"
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// src/defaults/NeatlintOptions.default.ts
|
|
2
|
-
import
|
|
2
|
+
import TSESLint from "typescript-eslint";
|
|
3
3
|
var NeatlintOptionsDefault = {
|
|
4
4
|
ignores: ["./dist/**"],
|
|
5
5
|
typescript_eslint: {
|
|
6
6
|
files: ["**/*.ts", "**/*.tsx"],
|
|
7
7
|
languageOptions: {
|
|
8
|
-
parser:
|
|
8
|
+
parser: TSESLint.parser,
|
|
9
9
|
parserOptions: {
|
|
10
10
|
project: "./tsconfig.json",
|
|
11
11
|
sourceType: "module"
|
|
@@ -29,16 +29,16 @@ var NeatlintOptionsDefault = {
|
|
|
29
29
|
plugins: {},
|
|
30
30
|
rules: {
|
|
31
31
|
"arrow-body-style": "error",
|
|
32
|
-
"comma-dangle": "error",
|
|
33
32
|
"func-style": ["error", "expression", { allowArrowFunctions: true }],
|
|
34
33
|
"no-duplicate-imports": "error",
|
|
35
34
|
"no-empty": "error",
|
|
36
|
-
"no-multi-spaces": "error",
|
|
37
|
-
"no-multiple-empty-lines": ["error", { max: 1 }],
|
|
38
35
|
"no-restricted-syntax": ["error", "SwitchStatement"],
|
|
39
|
-
"no-
|
|
36
|
+
"no-useless-backreference": "error",
|
|
40
37
|
"no-useless-catch": "error",
|
|
38
|
+
"no-useless-computed-key": "error",
|
|
39
|
+
"no-useless-concat": "error",
|
|
41
40
|
"no-useless-constructor": "error",
|
|
41
|
+
"no-useless-escape": "error",
|
|
42
42
|
"no-useless-rename": "error",
|
|
43
43
|
"no-useless-return": "error",
|
|
44
44
|
"no-var": "error",
|
|
@@ -46,10 +46,7 @@ var NeatlintOptionsDefault = {
|
|
|
46
46
|
"prefer-arrow-callback": "error",
|
|
47
47
|
"prefer-const": "error",
|
|
48
48
|
"prefer-template": "error",
|
|
49
|
-
|
|
50
|
-
eqeqeq: "error",
|
|
51
|
-
indent: ["error", 2],
|
|
52
|
-
quotes: ["error", "double"]
|
|
49
|
+
eqeqeq: "error"
|
|
53
50
|
}
|
|
54
51
|
}
|
|
55
52
|
};
|
package/dist/main.js
CHANGED
|
@@ -69,16 +69,16 @@ var NeatlintOptionsDefault = {
|
|
|
69
69
|
plugins: {},
|
|
70
70
|
rules: {
|
|
71
71
|
"arrow-body-style": "error",
|
|
72
|
-
"comma-dangle": "error",
|
|
73
72
|
"func-style": ["error", "expression", { allowArrowFunctions: true }],
|
|
74
73
|
"no-duplicate-imports": "error",
|
|
75
74
|
"no-empty": "error",
|
|
76
|
-
"no-multi-spaces": "error",
|
|
77
|
-
"no-multiple-empty-lines": ["error", { max: 1 }],
|
|
78
75
|
"no-restricted-syntax": ["error", "SwitchStatement"],
|
|
79
|
-
"no-
|
|
76
|
+
"no-useless-backreference": "error",
|
|
80
77
|
"no-useless-catch": "error",
|
|
78
|
+
"no-useless-computed-key": "error",
|
|
79
|
+
"no-useless-concat": "error",
|
|
81
80
|
"no-useless-constructor": "error",
|
|
81
|
+
"no-useless-escape": "error",
|
|
82
82
|
"no-useless-rename": "error",
|
|
83
83
|
"no-useless-return": "error",
|
|
84
84
|
"no-var": "error",
|
|
@@ -86,10 +86,7 @@ var NeatlintOptionsDefault = {
|
|
|
86
86
|
"prefer-arrow-callback": "error",
|
|
87
87
|
"prefer-const": "error",
|
|
88
88
|
"prefer-template": "error",
|
|
89
|
-
|
|
90
|
-
eqeqeq: "error",
|
|
91
|
-
indent: ["error", 2],
|
|
92
|
-
quotes: ["error", "double"]
|
|
89
|
+
eqeqeq: "error"
|
|
93
90
|
}
|
|
94
91
|
}
|
|
95
92
|
};
|
package/dist/main.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// src/utils/Neatlint.util.ts
|
|
2
|
-
import
|
|
2
|
+
import TSESLint2 from "typescript-eslint";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
5
5
|
// src/defaults/NeatlintOptions.default.ts
|
|
6
|
-
import
|
|
6
|
+
import TSESLint from "typescript-eslint";
|
|
7
7
|
var NeatlintOptionsDefault = {
|
|
8
8
|
ignores: ["./dist/**"],
|
|
9
9
|
typescript_eslint: {
|
|
10
10
|
files: ["**/*.ts", "**/*.tsx"],
|
|
11
11
|
languageOptions: {
|
|
12
|
-
parser:
|
|
12
|
+
parser: TSESLint.parser,
|
|
13
13
|
parserOptions: {
|
|
14
14
|
project: "./tsconfig.json",
|
|
15
15
|
sourceType: "module"
|
|
@@ -33,16 +33,16 @@ var NeatlintOptionsDefault = {
|
|
|
33
33
|
plugins: {},
|
|
34
34
|
rules: {
|
|
35
35
|
"arrow-body-style": "error",
|
|
36
|
-
"comma-dangle": "error",
|
|
37
36
|
"func-style": ["error", "expression", { allowArrowFunctions: true }],
|
|
38
37
|
"no-duplicate-imports": "error",
|
|
39
38
|
"no-empty": "error",
|
|
40
|
-
"no-multi-spaces": "error",
|
|
41
|
-
"no-multiple-empty-lines": ["error", { max: 1 }],
|
|
42
39
|
"no-restricted-syntax": ["error", "SwitchStatement"],
|
|
43
|
-
"no-
|
|
40
|
+
"no-useless-backreference": "error",
|
|
44
41
|
"no-useless-catch": "error",
|
|
42
|
+
"no-useless-computed-key": "error",
|
|
43
|
+
"no-useless-concat": "error",
|
|
45
44
|
"no-useless-constructor": "error",
|
|
45
|
+
"no-useless-escape": "error",
|
|
46
46
|
"no-useless-rename": "error",
|
|
47
47
|
"no-useless-return": "error",
|
|
48
48
|
"no-var": "error",
|
|
@@ -50,10 +50,7 @@ var NeatlintOptionsDefault = {
|
|
|
50
50
|
"prefer-arrow-callback": "error",
|
|
51
51
|
"prefer-const": "error",
|
|
52
52
|
"prefer-template": "error",
|
|
53
|
-
|
|
54
|
-
eqeqeq: "error",
|
|
55
|
-
indent: ["error", 2],
|
|
56
|
-
quotes: ["error", "double"]
|
|
53
|
+
eqeqeq: "error"
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
};
|
|
@@ -63,7 +60,7 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
|
|
|
63
60
|
options = _.merge({}, NeatlintOptionsDefault, options);
|
|
64
61
|
return [
|
|
65
62
|
{ ignores: options.ignores },
|
|
66
|
-
...
|
|
63
|
+
...TSESLint2.configs.strict,
|
|
67
64
|
{
|
|
68
65
|
files: options.typescript_eslint.files,
|
|
69
66
|
languageOptions: options.typescript_eslint.languageOptions,
|
|
@@ -67,16 +67,16 @@ var NeatlintOptionsDefault = {
|
|
|
67
67
|
plugins: {},
|
|
68
68
|
rules: {
|
|
69
69
|
"arrow-body-style": "error",
|
|
70
|
-
"comma-dangle": "error",
|
|
71
70
|
"func-style": ["error", "expression", { allowArrowFunctions: true }],
|
|
72
71
|
"no-duplicate-imports": "error",
|
|
73
72
|
"no-empty": "error",
|
|
74
|
-
"no-multi-spaces": "error",
|
|
75
|
-
"no-multiple-empty-lines": ["error", { max: 1 }],
|
|
76
73
|
"no-restricted-syntax": ["error", "SwitchStatement"],
|
|
77
|
-
"no-
|
|
74
|
+
"no-useless-backreference": "error",
|
|
78
75
|
"no-useless-catch": "error",
|
|
76
|
+
"no-useless-computed-key": "error",
|
|
77
|
+
"no-useless-concat": "error",
|
|
79
78
|
"no-useless-constructor": "error",
|
|
79
|
+
"no-useless-escape": "error",
|
|
80
80
|
"no-useless-rename": "error",
|
|
81
81
|
"no-useless-return": "error",
|
|
82
82
|
"no-var": "error",
|
|
@@ -84,10 +84,7 @@ var NeatlintOptionsDefault = {
|
|
|
84
84
|
"prefer-arrow-callback": "error",
|
|
85
85
|
"prefer-const": "error",
|
|
86
86
|
"prefer-template": "error",
|
|
87
|
-
|
|
88
|
-
eqeqeq: "error",
|
|
89
|
-
indent: ["error", 2],
|
|
90
|
-
quotes: ["error", "double"]
|
|
87
|
+
eqeqeq: "error"
|
|
91
88
|
}
|
|
92
89
|
}
|
|
93
90
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// src/utils/Neatlint.util.ts
|
|
2
|
-
import
|
|
2
|
+
import TSESLint2 from "typescript-eslint";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
5
5
|
// src/defaults/NeatlintOptions.default.ts
|
|
6
|
-
import
|
|
6
|
+
import TSESLint from "typescript-eslint";
|
|
7
7
|
var NeatlintOptionsDefault = {
|
|
8
8
|
ignores: ["./dist/**"],
|
|
9
9
|
typescript_eslint: {
|
|
10
10
|
files: ["**/*.ts", "**/*.tsx"],
|
|
11
11
|
languageOptions: {
|
|
12
|
-
parser:
|
|
12
|
+
parser: TSESLint.parser,
|
|
13
13
|
parserOptions: {
|
|
14
14
|
project: "./tsconfig.json",
|
|
15
15
|
sourceType: "module"
|
|
@@ -33,16 +33,16 @@ var NeatlintOptionsDefault = {
|
|
|
33
33
|
plugins: {},
|
|
34
34
|
rules: {
|
|
35
35
|
"arrow-body-style": "error",
|
|
36
|
-
"comma-dangle": "error",
|
|
37
36
|
"func-style": ["error", "expression", { allowArrowFunctions: true }],
|
|
38
37
|
"no-duplicate-imports": "error",
|
|
39
38
|
"no-empty": "error",
|
|
40
|
-
"no-multi-spaces": "error",
|
|
41
|
-
"no-multiple-empty-lines": ["error", { max: 1 }],
|
|
42
39
|
"no-restricted-syntax": ["error", "SwitchStatement"],
|
|
43
|
-
"no-
|
|
40
|
+
"no-useless-backreference": "error",
|
|
44
41
|
"no-useless-catch": "error",
|
|
42
|
+
"no-useless-computed-key": "error",
|
|
43
|
+
"no-useless-concat": "error",
|
|
45
44
|
"no-useless-constructor": "error",
|
|
45
|
+
"no-useless-escape": "error",
|
|
46
46
|
"no-useless-rename": "error",
|
|
47
47
|
"no-useless-return": "error",
|
|
48
48
|
"no-var": "error",
|
|
@@ -50,10 +50,7 @@ var NeatlintOptionsDefault = {
|
|
|
50
50
|
"prefer-arrow-callback": "error",
|
|
51
51
|
"prefer-const": "error",
|
|
52
52
|
"prefer-template": "error",
|
|
53
|
-
|
|
54
|
-
eqeqeq: "error",
|
|
55
|
-
indent: ["error", 2],
|
|
56
|
-
quotes: ["error", "double"]
|
|
53
|
+
eqeqeq: "error"
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
};
|
|
@@ -63,7 +60,7 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
|
|
|
63
60
|
options = _.merge({}, NeatlintOptionsDefault, options);
|
|
64
61
|
return [
|
|
65
62
|
{ ignores: options.ignores },
|
|
66
|
-
...
|
|
63
|
+
...TSESLint2.configs.strict,
|
|
67
64
|
{
|
|
68
65
|
files: options.typescript_eslint.files,
|
|
69
66
|
languageOptions: options.typescript_eslint.languageOptions,
|