neatlint 1.0.3 → 1.0.4

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
@@ -32,7 +32,6 @@
32
32
  - [Import](#import)
33
33
  - [Methods](#methods)
34
34
  - [Recommended use](#recommended-use)
35
- - [What does it do?](#what-does-it-do)
36
35
  - [Types](#types)
37
36
  - [Links](#links)
38
37
  - [Discord](https://discord.gg/keift)
@@ -168,35 +167,6 @@ Suggested uses are as follows. We recommend using Prettier.
168
167
  > }
169
168
  > ```
170
169
 
171
- ### What does it do?
172
-
173
- Neatlint offers strict ESLint settings. These rules also include [strict-type-checked](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslintrc/strict-type-checked.ts), [stylistic-type-checked](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslintrc/stylistic-type-checked.ts) and [eslint-recommended](https://npmjs.com/package/@eslint/js).
174
-
175
- | Rule | Description |
176
- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
177
- | [arrow-body-style](https://eslint.org/docs/latest/rules/arrow-body-style) | Require braces around arrow function bodies. |
178
- | [func-style](https://eslint.org/docs/latest/rules/func-style) | Enforce the consistent use of either function declarations or expressions assigned to variables. |
179
- | [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports) | Disallow duplicate module imports. |
180
- | [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax) | Disallow specified syntax. |
181
- | [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key) | Disallow unnecessary computed property keys in objects and classes. |
182
- | [no-useless-concat](https://eslint.org/docs/latest/rules/no-useless-concat) | Disallow unnecessary concatenation of literals or template literals. |
183
- | [no-useless-constructor](https://eslint.org/docs/latest/rules/no-useless-constructor) | Disallow unnecessary constructors. |
184
- | [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename) | Disallow renaming import, export, and destructured assignments to the same name. |
185
- | [no-useless-return](https://eslint.org/docs/latest/rules/no-useless-return) | Disallow redundant return statements. |
186
- | [no-var](https://eslint.org/docs/latest/rules/no-var) | Require let or const instead of var. |
187
- | [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand) | Require or disallow method and property shorthand syntax for object literals. |
188
- | [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback) | Require using arrow functions for callbacks. |
189
- | [prefer-const](https://eslint.org/docs/latest/rules/prefer-const) | Require const declarations for variables that are never reassigned after declared. |
190
- | [prefer-template](https://eslint.org/docs/latest/rules/prefer-template) | Require template literals instead of string concatenation. |
191
- | [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq) | Require the use of === and !==. |
192
- | [@typescript-eslint/consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions) | Enforce type definitions to consistently use either interface or type. |
193
- | [@typescript-eslint/consistent-type-exports](https://typescript-eslint.io/rules/consistent-type-exports) | Enforce consistent usage of type exports. |
194
- | [@typescript-eslint/consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports) | Enforce consistent usage of type imports. |
195
- | [@typescript-eslint/explicit-function-return-type](https://typescript-eslint.io/rules/explicit-function-return-type) | Require explicit return types on functions and class methods. |
196
- | [@typescript-eslint/explicit-member-accessibility](https://typescript-eslint.io/rules/explicit-member-accessibility) | Require explicit accessibility modifiers on class properties and methods. |
197
- | [@typescript-eslint/prefer-readonly](https://typescript-eslint.io/rules/prefer-readonly) | Require private members to be marked as readonly if they're never modified outside of the constructor. |
198
- | [@typescript-eslint/strict-boolean-expressions](https://typescript-eslint.io/rules/strict-boolean-expressions) | Disallow certain types in boolean expressions. |
199
-
200
170
  ### Types
201
171
 
202
172
  | Type |
@@ -46,13 +46,13 @@ var NeatlintOptionsDefault = {
46
46
  }
47
47
  },
48
48
  plugins: {},
49
- extends: [],
50
49
  rules: {
51
50
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
52
51
  "@typescript-eslint/consistent-type-exports": "error",
53
52
  "@typescript-eslint/consistent-type-imports": "error",
54
53
  "@typescript-eslint/explicit-function-return-type": "error",
55
54
  "@typescript-eslint/explicit-member-accessibility": "error",
55
+ "@typescript-eslint/no-inferrable-types": "error",
56
56
  "@typescript-eslint/prefer-readonly": "error",
57
57
  "@typescript-eslint/strict-boolean-expressions": "error"
58
58
  }
@@ -61,7 +61,6 @@ var NeatlintOptionsDefault = {
61
61
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
62
62
  languageOptions: {},
63
63
  plugins: {},
64
- extends: [],
65
64
  rules: {
66
65
  "arrow-body-style": "error",
67
66
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
@@ -12,13 +12,13 @@ var NeatlintOptionsDefault = {
12
12
  }
13
13
  },
14
14
  plugins: {},
15
- extends: [],
16
15
  rules: {
17
16
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
18
17
  "@typescript-eslint/consistent-type-exports": "error",
19
18
  "@typescript-eslint/consistent-type-imports": "error",
20
19
  "@typescript-eslint/explicit-function-return-type": "error",
21
20
  "@typescript-eslint/explicit-member-accessibility": "error",
21
+ "@typescript-eslint/no-inferrable-types": "error",
22
22
  "@typescript-eslint/prefer-readonly": "error",
23
23
  "@typescript-eslint/strict-boolean-expressions": "error"
24
24
  }
@@ -27,7 +27,6 @@ var NeatlintOptionsDefault = {
27
27
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
28
28
  languageOptions: {},
29
29
  plugins: {},
30
- extends: [],
31
30
  rules: {
32
31
  "arrow-body-style": "error",
33
32
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
package/dist/main.js CHANGED
@@ -36,7 +36,6 @@ module.exports = __toCommonJS(main_exports);
36
36
 
37
37
  // src/utils/Neatlint.util.ts
38
38
  var import_typescript_eslint2 = __toESM(require("typescript-eslint"));
39
- var import_js = __toESM(require("@eslint/js"));
40
39
  var import_lodash = __toESM(require("lodash"));
41
40
 
42
41
  // src/defaults/NeatlintOptions.default.ts
@@ -53,13 +52,13 @@ var NeatlintOptionsDefault = {
53
52
  }
54
53
  },
55
54
  plugins: {},
56
- extends: [],
57
55
  rules: {
58
56
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
59
57
  "@typescript-eslint/consistent-type-exports": "error",
60
58
  "@typescript-eslint/consistent-type-imports": "error",
61
59
  "@typescript-eslint/explicit-function-return-type": "error",
62
60
  "@typescript-eslint/explicit-member-accessibility": "error",
61
+ "@typescript-eslint/no-inferrable-types": "error",
63
62
  "@typescript-eslint/prefer-readonly": "error",
64
63
  "@typescript-eslint/strict-boolean-expressions": "error"
65
64
  }
@@ -68,7 +67,6 @@ var NeatlintOptionsDefault = {
68
67
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
69
68
  languageOptions: {},
70
69
  plugins: {},
71
- extends: [],
72
70
  rules: {
73
71
  "arrow-body-style": "error",
74
72
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
@@ -94,9 +92,7 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
94
92
  options = import_lodash.default.merge({}, NeatlintOptionsDefault, options);
95
93
  return [
96
94
  { ignores: options.ignores },
97
- ...import_typescript_eslint2.default.configs.strictTypeChecked,
98
- ...import_typescript_eslint2.default.configs.stylisticTypeChecked,
99
- import_js.default.configs.recommended,
95
+ ...import_typescript_eslint2.default.configs.strict,
100
96
  {
101
97
  files: options.typescript_eslint.files,
102
98
  languageOptions: options.typescript_eslint.languageOptions,
package/dist/main.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  // src/utils/Neatlint.util.ts
2
2
  import TSESLint2 from "typescript-eslint";
3
- import ESLintJS from "@eslint/js";
4
3
  import _ from "lodash";
5
4
 
6
5
  // src/defaults/NeatlintOptions.default.ts
@@ -17,13 +16,13 @@ var NeatlintOptionsDefault = {
17
16
  }
18
17
  },
19
18
  plugins: {},
20
- extends: [],
21
19
  rules: {
22
20
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
23
21
  "@typescript-eslint/consistent-type-exports": "error",
24
22
  "@typescript-eslint/consistent-type-imports": "error",
25
23
  "@typescript-eslint/explicit-function-return-type": "error",
26
24
  "@typescript-eslint/explicit-member-accessibility": "error",
25
+ "@typescript-eslint/no-inferrable-types": "error",
27
26
  "@typescript-eslint/prefer-readonly": "error",
28
27
  "@typescript-eslint/strict-boolean-expressions": "error"
29
28
  }
@@ -32,7 +31,6 @@ var NeatlintOptionsDefault = {
32
31
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
33
32
  languageOptions: {},
34
33
  plugins: {},
35
- extends: [],
36
34
  rules: {
37
35
  "arrow-body-style": "error",
38
36
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
@@ -58,9 +56,7 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
58
56
  options = _.merge({}, NeatlintOptionsDefault, options);
59
57
  return [
60
58
  { ignores: options.ignores },
61
- ...TSESLint2.configs.strictTypeChecked,
62
- ...TSESLint2.configs.stylisticTypeChecked,
63
- ESLintJS.configs.recommended,
59
+ ...TSESLint2.configs.strict,
64
60
  {
65
61
  files: options.typescript_eslint.files,
66
62
  languageOptions: options.typescript_eslint.languageOptions,
@@ -4,14 +4,12 @@ type NeatlintOptions = {
4
4
  files: string[];
5
5
  languageOptions: object;
6
6
  plugins: Record<string, unknown>;
7
- extends: string[];
8
7
  rules: Record<string, string | object>;
9
8
  };
10
9
  eslint: {
11
10
  files: string[];
12
11
  languageOptions: object;
13
12
  plugins: Record<string, unknown>;
14
- extends: string[];
15
13
  rules: Record<string, string | object>;
16
14
  };
17
15
  };
@@ -4,14 +4,12 @@ type NeatlintOptions = {
4
4
  files: string[];
5
5
  languageOptions: object;
6
6
  plugins: Record<string, unknown>;
7
- extends: string[];
8
7
  rules: Record<string, string | object>;
9
8
  };
10
9
  eslint: {
11
10
  files: string[];
12
11
  languageOptions: object;
13
12
  plugins: Record<string, unknown>;
14
- extends: string[];
15
13
  rules: Record<string, string | object>;
16
14
  };
17
15
  };
@@ -34,7 +34,6 @@ __export(Neatlint_util_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(Neatlint_util_exports);
36
36
  var import_typescript_eslint2 = __toESM(require("typescript-eslint"));
37
- var import_js = __toESM(require("@eslint/js"));
38
37
  var import_lodash = __toESM(require("lodash"));
39
38
 
40
39
  // src/defaults/NeatlintOptions.default.ts
@@ -51,13 +50,13 @@ var NeatlintOptionsDefault = {
51
50
  }
52
51
  },
53
52
  plugins: {},
54
- extends: [],
55
53
  rules: {
56
54
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
57
55
  "@typescript-eslint/consistent-type-exports": "error",
58
56
  "@typescript-eslint/consistent-type-imports": "error",
59
57
  "@typescript-eslint/explicit-function-return-type": "error",
60
58
  "@typescript-eslint/explicit-member-accessibility": "error",
59
+ "@typescript-eslint/no-inferrable-types": "error",
61
60
  "@typescript-eslint/prefer-readonly": "error",
62
61
  "@typescript-eslint/strict-boolean-expressions": "error"
63
62
  }
@@ -66,7 +65,6 @@ var NeatlintOptionsDefault = {
66
65
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
67
66
  languageOptions: {},
68
67
  plugins: {},
69
- extends: [],
70
68
  rules: {
71
69
  "arrow-body-style": "error",
72
70
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
@@ -92,9 +90,7 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
92
90
  options = import_lodash.default.merge({}, NeatlintOptionsDefault, options);
93
91
  return [
94
92
  { ignores: options.ignores },
95
- ...import_typescript_eslint2.default.configs.strictTypeChecked,
96
- ...import_typescript_eslint2.default.configs.stylisticTypeChecked,
97
- import_js.default.configs.recommended,
93
+ ...import_typescript_eslint2.default.configs.strict,
98
94
  {
99
95
  files: options.typescript_eslint.files,
100
96
  languageOptions: options.typescript_eslint.languageOptions,
@@ -1,6 +1,5 @@
1
1
  // src/utils/Neatlint.util.ts
2
2
  import TSESLint2 from "typescript-eslint";
3
- import ESLintJS from "@eslint/js";
4
3
  import _ from "lodash";
5
4
 
6
5
  // src/defaults/NeatlintOptions.default.ts
@@ -17,13 +16,13 @@ var NeatlintOptionsDefault = {
17
16
  }
18
17
  },
19
18
  plugins: {},
20
- extends: [],
21
19
  rules: {
22
20
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
23
21
  "@typescript-eslint/consistent-type-exports": "error",
24
22
  "@typescript-eslint/consistent-type-imports": "error",
25
23
  "@typescript-eslint/explicit-function-return-type": "error",
26
24
  "@typescript-eslint/explicit-member-accessibility": "error",
25
+ "@typescript-eslint/no-inferrable-types": "error",
27
26
  "@typescript-eslint/prefer-readonly": "error",
28
27
  "@typescript-eslint/strict-boolean-expressions": "error"
29
28
  }
@@ -32,7 +31,6 @@ var NeatlintOptionsDefault = {
32
31
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
33
32
  languageOptions: {},
34
33
  plugins: {},
35
- extends: [],
36
34
  rules: {
37
35
  "arrow-body-style": "error",
38
36
  "func-style": ["error", "expression", { allowArrowFunctions: true }],
@@ -58,9 +56,7 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
58
56
  options = _.merge({}, NeatlintOptionsDefault, options);
59
57
  return [
60
58
  { ignores: options.ignores },
61
- ...TSESLint2.configs.strictTypeChecked,
62
- ...TSESLint2.configs.stylisticTypeChecked,
63
- ESLintJS.configs.recommended,
59
+ ...TSESLint2.configs.strict,
64
60
  {
65
61
  files: options.typescript_eslint.files,
66
62
  languageOptions: options.typescript_eslint.languageOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neatlint",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Strict ESLint presets for modern TypeScript projects.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/keift/neatlint",
@@ -15,7 +15,6 @@
15
15
  "lint": "eslint ./"
16
16
  },
17
17
  "dependencies": {
18
- "@eslint/js": "^9.35.0",
19
18
  "@types/lodash": "^4.17.20",
20
19
  "jiti": "^2.5.1",
21
20
  "lodash": "^4.17.21",