neatlint 1.1.5 → 1.1.7

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 CHANGED
@@ -47,15 +47,13 @@ Strict ESLint presets for modern TypeScript projects.
47
47
 
48
48
  ## Features
49
49
 
50
- - Requires not using unnecessary types
51
- - Requires use of arrow functions
52
- - Requires the use of backtick
53
- - Requires specifying read only in classes
54
- - Requires specifying accessibility in classes
55
- - Forbids interfaces, only types are used
56
- - Unnecessary quotes are prevented on objects
57
- - Use of `var` is prohibited and it warns against using `const` and `let` when necessary
58
- - ... and more!
50
+ - Enforces type safety
51
+ - Encourages modern syntax
52
+ - Prohibits potentially unsafe patterns
53
+ - Requires explicit readonly and accessibility modifiers in classes
54
+ - Disallows interfaces, using only types
55
+ - Bans `var` and warns about proper use of `const` and `let`
56
+ - ...and much more!
59
57
 
60
58
  ## Installation
61
59
 
@@ -99,7 +97,7 @@ Briefly as follows.
99
97
  > **📁 ./eslint.config.ts**
100
98
  >
101
99
  > ```typescript
102
- > import { Neatlint } from "neatlint";
100
+ > import { Neatlint } from 'neatlint';
103
101
  >
104
102
  > export default Neatlint();
105
103
  > ```
@@ -129,7 +127,7 @@ Suggested uses are as follows. We recommend using [Prettier](https://npmjs.com/p
129
127
  > **📁 ./eslint.config.ts**
130
128
  >
131
129
  > ```typescript
132
- > import { Neatlint } from "neatlint";
130
+ > import { Neatlint } from 'neatlint';
133
131
  >
134
132
  > export default Neatlint();
135
133
  > ```
@@ -157,7 +155,7 @@ Suggested uses are as follows. We recommend using [Prettier](https://npmjs.com/p
157
155
  > ```json
158
156
  > {
159
157
  > "semi": true,
160
- > "singleQuote": false,
158
+ > "singleQuote": true,
161
159
  >
162
160
  > "printWidth": 9999,
163
161
  > "tabWidth": 2,
@@ -44,23 +44,36 @@ var NeatlintOptionsDefault = {
44
44
  plugins: {},
45
45
  rules: {
46
46
  ...import_js.default.configs.recommended.rules,
47
+ ...Object.assign(
48
+ {},
49
+ ...import_typescript_eslint.default.configs.strictTypeChecked.map(
50
+ (item) => Object.fromEntries(
51
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
52
+ )
53
+ )
54
+ ),
55
+ ...Object.assign(
56
+ {},
57
+ ...import_typescript_eslint.default.configs.stylisticTypeChecked.map(
58
+ (item) => Object.fromEntries(
59
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
60
+ )
61
+ )
62
+ ),
63
+ ...import_typescript_eslint.default.configs.eslintRecommended.rules,
47
64
  "no-undef": "off",
48
- "arrow-body-style": "error",
49
65
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
50
66
  "no-duplicate-imports": "error",
51
67
  "no-eval": "error",
52
68
  "no-restricted-syntax": ["error", "DebuggerStatement", "EmptyStatement", "ForInStatement", "LabeledStatement", "SequenceExpression", "SwitchStatement", "WithStatement"],
69
+ "no-useless-call": "error",
53
70
  "no-useless-computed-key": "error",
54
71
  "no-useless-concat": "error",
55
- "no-useless-constructor": "error",
56
72
  "no-useless-rename": "error",
57
73
  "no-useless-return": "error",
58
- "no-var": "error",
59
74
  "object-shorthand": "error",
60
75
  "prefer-arrow-callback": "error",
61
- "prefer-const": "error",
62
76
  "prefer-template": "error",
63
- "require-await": "error",
64
77
  eqeqeq: "error"
65
78
  }
66
79
  },
@@ -84,8 +97,6 @@ var NeatlintOptionsDefault = {
84
97
  "@typescript-eslint/consistent-type-exports": "error",
85
98
  "@typescript-eslint/consistent-type-imports": "error",
86
99
  "@typescript-eslint/explicit-member-accessibility": "error",
87
- "@typescript-eslint/no-inferrable-types": "error",
88
- // stylisticTypeChecked
89
100
  "@typescript-eslint/prefer-readonly": "error",
90
101
  "@typescript-eslint/strict-boolean-expressions": "error"
91
102
  }
@@ -10,23 +10,36 @@ var NeatlintOptionsDefault = {
10
10
  plugins: {},
11
11
  rules: {
12
12
  ...ESLintJS.configs.recommended.rules,
13
+ ...Object.assign(
14
+ {},
15
+ ...TSESLint.configs.strictTypeChecked.map(
16
+ (item) => Object.fromEntries(
17
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
18
+ )
19
+ )
20
+ ),
21
+ ...Object.assign(
22
+ {},
23
+ ...TSESLint.configs.stylisticTypeChecked.map(
24
+ (item) => Object.fromEntries(
25
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
26
+ )
27
+ )
28
+ ),
29
+ ...TSESLint.configs.eslintRecommended.rules,
13
30
  "no-undef": "off",
14
- "arrow-body-style": "error",
15
31
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
16
32
  "no-duplicate-imports": "error",
17
33
  "no-eval": "error",
18
34
  "no-restricted-syntax": ["error", "DebuggerStatement", "EmptyStatement", "ForInStatement", "LabeledStatement", "SequenceExpression", "SwitchStatement", "WithStatement"],
35
+ "no-useless-call": "error",
19
36
  "no-useless-computed-key": "error",
20
37
  "no-useless-concat": "error",
21
- "no-useless-constructor": "error",
22
38
  "no-useless-rename": "error",
23
39
  "no-useless-return": "error",
24
- "no-var": "error",
25
40
  "object-shorthand": "error",
26
41
  "prefer-arrow-callback": "error",
27
- "prefer-const": "error",
28
42
  "prefer-template": "error",
29
- "require-await": "error",
30
43
  eqeqeq: "error"
31
44
  }
32
45
  },
@@ -50,8 +63,6 @@ var NeatlintOptionsDefault = {
50
63
  "@typescript-eslint/consistent-type-exports": "error",
51
64
  "@typescript-eslint/consistent-type-imports": "error",
52
65
  "@typescript-eslint/explicit-member-accessibility": "error",
53
- "@typescript-eslint/no-inferrable-types": "error",
54
- // stylisticTypeChecked
55
66
  "@typescript-eslint/prefer-readonly": "error",
56
67
  "@typescript-eslint/strict-boolean-expressions": "error"
57
68
  }
package/dist/main.js CHANGED
@@ -49,23 +49,36 @@ var NeatlintOptionsDefault = {
49
49
  plugins: {},
50
50
  rules: {
51
51
  ...import_js.default.configs.recommended.rules,
52
+ ...Object.assign(
53
+ {},
54
+ ...import_typescript_eslint.default.configs.strictTypeChecked.map(
55
+ (item) => Object.fromEntries(
56
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
57
+ )
58
+ )
59
+ ),
60
+ ...Object.assign(
61
+ {},
62
+ ...import_typescript_eslint.default.configs.stylisticTypeChecked.map(
63
+ (item) => Object.fromEntries(
64
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
65
+ )
66
+ )
67
+ ),
68
+ ...import_typescript_eslint.default.configs.eslintRecommended.rules,
52
69
  "no-undef": "off",
53
- "arrow-body-style": "error",
54
70
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
55
71
  "no-duplicate-imports": "error",
56
72
  "no-eval": "error",
57
73
  "no-restricted-syntax": ["error", "DebuggerStatement", "EmptyStatement", "ForInStatement", "LabeledStatement", "SequenceExpression", "SwitchStatement", "WithStatement"],
74
+ "no-useless-call": "error",
58
75
  "no-useless-computed-key": "error",
59
76
  "no-useless-concat": "error",
60
- "no-useless-constructor": "error",
61
77
  "no-useless-rename": "error",
62
78
  "no-useless-return": "error",
63
- "no-var": "error",
64
79
  "object-shorthand": "error",
65
80
  "prefer-arrow-callback": "error",
66
- "prefer-const": "error",
67
81
  "prefer-template": "error",
68
- "require-await": "error",
69
82
  eqeqeq: "error"
70
83
  }
71
84
  },
@@ -89,8 +102,6 @@ var NeatlintOptionsDefault = {
89
102
  "@typescript-eslint/consistent-type-exports": "error",
90
103
  "@typescript-eslint/consistent-type-imports": "error",
91
104
  "@typescript-eslint/explicit-member-accessibility": "error",
92
- "@typescript-eslint/no-inferrable-types": "error",
93
- // stylisticTypeChecked
94
105
  "@typescript-eslint/prefer-readonly": "error",
95
106
  "@typescript-eslint/strict-boolean-expressions": "error"
96
107
  }
package/dist/main.mjs CHANGED
@@ -13,23 +13,36 @@ var NeatlintOptionsDefault = {
13
13
  plugins: {},
14
14
  rules: {
15
15
  ...ESLintJS.configs.recommended.rules,
16
+ ...Object.assign(
17
+ {},
18
+ ...TSESLint.configs.strictTypeChecked.map(
19
+ (item) => Object.fromEntries(
20
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
21
+ )
22
+ )
23
+ ),
24
+ ...Object.assign(
25
+ {},
26
+ ...TSESLint.configs.stylisticTypeChecked.map(
27
+ (item) => Object.fromEntries(
28
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
29
+ )
30
+ )
31
+ ),
32
+ ...TSESLint.configs.eslintRecommended.rules,
16
33
  "no-undef": "off",
17
- "arrow-body-style": "error",
18
34
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
19
35
  "no-duplicate-imports": "error",
20
36
  "no-eval": "error",
21
37
  "no-restricted-syntax": ["error", "DebuggerStatement", "EmptyStatement", "ForInStatement", "LabeledStatement", "SequenceExpression", "SwitchStatement", "WithStatement"],
38
+ "no-useless-call": "error",
22
39
  "no-useless-computed-key": "error",
23
40
  "no-useless-concat": "error",
24
- "no-useless-constructor": "error",
25
41
  "no-useless-rename": "error",
26
42
  "no-useless-return": "error",
27
- "no-var": "error",
28
43
  "object-shorthand": "error",
29
44
  "prefer-arrow-callback": "error",
30
- "prefer-const": "error",
31
45
  "prefer-template": "error",
32
- "require-await": "error",
33
46
  eqeqeq: "error"
34
47
  }
35
48
  },
@@ -53,8 +66,6 @@ var NeatlintOptionsDefault = {
53
66
  "@typescript-eslint/consistent-type-exports": "error",
54
67
  "@typescript-eslint/consistent-type-imports": "error",
55
68
  "@typescript-eslint/explicit-member-accessibility": "error",
56
- "@typescript-eslint/no-inferrable-types": "error",
57
- // stylisticTypeChecked
58
69
  "@typescript-eslint/prefer-readonly": "error",
59
70
  "@typescript-eslint/strict-boolean-expressions": "error"
60
71
  }
@@ -3,18 +3,18 @@ import 'eslint';
3
3
 
4
4
  type NeatlintOptions = {
5
5
  disabled?: boolean;
6
- ignores?: ESLintConfig["ignores"];
6
+ ignores?: ESLintConfig['ignores'];
7
7
  javascript?: {
8
- files?: ESLintConfig["files"];
9
- languageOptions?: ESLintConfig["languageOptions"];
10
- plugins?: ESLintConfig["plugins"];
11
- rules?: ESLintConfig["rules"];
8
+ files?: ESLintConfig['files'];
9
+ languageOptions?: ESLintConfig['languageOptions'];
10
+ plugins?: ESLintConfig['plugins'];
11
+ rules?: ESLintConfig['rules'];
12
12
  };
13
13
  typescript?: {
14
- files?: ESLintConfig["files"];
15
- languageOptions?: ESLintConfig["languageOptions"];
16
- plugins?: ESLintConfig["plugins"];
17
- rules?: ESLintConfig["rules"];
14
+ files?: ESLintConfig['files'];
15
+ languageOptions?: ESLintConfig['languageOptions'];
16
+ plugins?: ESLintConfig['plugins'];
17
+ rules?: ESLintConfig['rules'];
18
18
  };
19
19
  config?: ESLintConfig[];
20
20
  };
@@ -3,18 +3,18 @@ import 'eslint';
3
3
 
4
4
  type NeatlintOptions = {
5
5
  disabled?: boolean;
6
- ignores?: ESLintConfig["ignores"];
6
+ ignores?: ESLintConfig['ignores'];
7
7
  javascript?: {
8
- files?: ESLintConfig["files"];
9
- languageOptions?: ESLintConfig["languageOptions"];
10
- plugins?: ESLintConfig["plugins"];
11
- rules?: ESLintConfig["rules"];
8
+ files?: ESLintConfig['files'];
9
+ languageOptions?: ESLintConfig['languageOptions'];
10
+ plugins?: ESLintConfig['plugins'];
11
+ rules?: ESLintConfig['rules'];
12
12
  };
13
13
  typescript?: {
14
- files?: ESLintConfig["files"];
15
- languageOptions?: ESLintConfig["languageOptions"];
16
- plugins?: ESLintConfig["plugins"];
17
- rules?: ESLintConfig["rules"];
14
+ files?: ESLintConfig['files'];
15
+ languageOptions?: ESLintConfig['languageOptions'];
16
+ plugins?: ESLintConfig['plugins'];
17
+ rules?: ESLintConfig['rules'];
18
18
  };
19
19
  config?: ESLintConfig[];
20
20
  };
@@ -47,23 +47,36 @@ var NeatlintOptionsDefault = {
47
47
  plugins: {},
48
48
  rules: {
49
49
  ...import_js.default.configs.recommended.rules,
50
+ ...Object.assign(
51
+ {},
52
+ ...import_typescript_eslint.default.configs.strictTypeChecked.map(
53
+ (item) => Object.fromEntries(
54
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
55
+ )
56
+ )
57
+ ),
58
+ ...Object.assign(
59
+ {},
60
+ ...import_typescript_eslint.default.configs.stylisticTypeChecked.map(
61
+ (item) => Object.fromEntries(
62
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
63
+ )
64
+ )
65
+ ),
66
+ ...import_typescript_eslint.default.configs.eslintRecommended.rules,
50
67
  "no-undef": "off",
51
- "arrow-body-style": "error",
52
68
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
53
69
  "no-duplicate-imports": "error",
54
70
  "no-eval": "error",
55
71
  "no-restricted-syntax": ["error", "DebuggerStatement", "EmptyStatement", "ForInStatement", "LabeledStatement", "SequenceExpression", "SwitchStatement", "WithStatement"],
72
+ "no-useless-call": "error",
56
73
  "no-useless-computed-key": "error",
57
74
  "no-useless-concat": "error",
58
- "no-useless-constructor": "error",
59
75
  "no-useless-rename": "error",
60
76
  "no-useless-return": "error",
61
- "no-var": "error",
62
77
  "object-shorthand": "error",
63
78
  "prefer-arrow-callback": "error",
64
- "prefer-const": "error",
65
79
  "prefer-template": "error",
66
- "require-await": "error",
67
80
  eqeqeq: "error"
68
81
  }
69
82
  },
@@ -87,8 +100,6 @@ var NeatlintOptionsDefault = {
87
100
  "@typescript-eslint/consistent-type-exports": "error",
88
101
  "@typescript-eslint/consistent-type-imports": "error",
89
102
  "@typescript-eslint/explicit-member-accessibility": "error",
90
- "@typescript-eslint/no-inferrable-types": "error",
91
- // stylisticTypeChecked
92
103
  "@typescript-eslint/prefer-readonly": "error",
93
104
  "@typescript-eslint/strict-boolean-expressions": "error"
94
105
  }
@@ -13,23 +13,36 @@ var NeatlintOptionsDefault = {
13
13
  plugins: {},
14
14
  rules: {
15
15
  ...ESLintJS.configs.recommended.rules,
16
+ ...Object.assign(
17
+ {},
18
+ ...TSESLint.configs.strictTypeChecked.map(
19
+ (item) => Object.fromEntries(
20
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
21
+ )
22
+ )
23
+ ),
24
+ ...Object.assign(
25
+ {},
26
+ ...TSESLint.configs.stylisticTypeChecked.map(
27
+ (item) => Object.fromEntries(
28
+ Object.entries(item.rules ?? {}).filter(([key]) => !key.startsWith("@typescript-eslint")).map(([key]) => [key, "error"])
29
+ )
30
+ )
31
+ ),
32
+ ...TSESLint.configs.eslintRecommended.rules,
16
33
  "no-undef": "off",
17
- "arrow-body-style": "error",
18
34
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
19
35
  "no-duplicate-imports": "error",
20
36
  "no-eval": "error",
21
37
  "no-restricted-syntax": ["error", "DebuggerStatement", "EmptyStatement", "ForInStatement", "LabeledStatement", "SequenceExpression", "SwitchStatement", "WithStatement"],
38
+ "no-useless-call": "error",
22
39
  "no-useless-computed-key": "error",
23
40
  "no-useless-concat": "error",
24
- "no-useless-constructor": "error",
25
41
  "no-useless-rename": "error",
26
42
  "no-useless-return": "error",
27
- "no-var": "error",
28
43
  "object-shorthand": "error",
29
44
  "prefer-arrow-callback": "error",
30
- "prefer-const": "error",
31
45
  "prefer-template": "error",
32
- "require-await": "error",
33
46
  eqeqeq: "error"
34
47
  }
35
48
  },
@@ -53,8 +66,6 @@ var NeatlintOptionsDefault = {
53
66
  "@typescript-eslint/consistent-type-exports": "error",
54
67
  "@typescript-eslint/consistent-type-imports": "error",
55
68
  "@typescript-eslint/explicit-member-accessibility": "error",
56
- "@typescript-eslint/no-inferrable-types": "error",
57
- // stylisticTypeChecked
58
69
  "@typescript-eslint/prefer-readonly": "error",
59
70
  "@typescript-eslint/strict-boolean-expressions": "error"
60
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neatlint",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Strict ESLint presets for modern TypeScript projects.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/keift/neatlint",
@@ -15,9 +15,9 @@
15
15
  "lint": "eslint ./"
16
16
  },
17
17
  "dependencies": {
18
- "@eslint/js": "^9.35.0",
18
+ "@eslint/js": "^9.36.0",
19
19
  "@types/lodash": "^4.17.20",
20
- "eslint": "^9.35.0",
20
+ "eslint": "^9.36.0",
21
21
  "jiti": "^2.5.1",
22
22
  "lodash": "^4.17.21",
23
23
  "typescript": "^5.9.2",