neatlint 1.1.1 → 1.1.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.
@@ -37,6 +37,31 @@ var import_typescript_eslint = __toESM(require("typescript-eslint"));
37
37
  var import_js = __toESM(require("@eslint/js"));
38
38
  var NeatlintOptionsDefault = {
39
39
  ignores: ["./dist/**"],
40
+ javascript: {
41
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
42
+ languageOptions: {},
43
+ plugins: {},
44
+ rules: {
45
+ ...import_js.default.configs.recommended.rules,
46
+ "no-undef": "off",
47
+ "arrow-body-style": "error",
48
+ "func-style": ["error", "expression", { allowArrowFunctions: true }],
49
+ "no-duplicate-imports": "error",
50
+ "no-restricted-syntax": ["error", "SwitchStatement"],
51
+ "no-useless-computed-key": "error",
52
+ "no-useless-concat": "error",
53
+ "no-useless-constructor": "error",
54
+ "no-useless-rename": "error",
55
+ "no-useless-return": "error",
56
+ "no-var": "error",
57
+ "object-shorthand": "error",
58
+ "prefer-arrow-callback": "error",
59
+ "prefer-const": "error",
60
+ "prefer-template": "error",
61
+ "require-await": "error",
62
+ eqeqeq: "error"
63
+ }
64
+ },
40
65
  typescript: {
41
66
  files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
42
67
  languageOptions: {
@@ -63,31 +88,6 @@ var NeatlintOptionsDefault = {
63
88
  "@typescript-eslint/prefer-readonly": "error",
64
89
  "@typescript-eslint/strict-boolean-expressions": "error"
65
90
  }
66
- },
67
- javascript: {
68
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
69
- languageOptions: {},
70
- plugins: {},
71
- rules: {
72
- ...import_js.default.configs.recommended.rules,
73
- "no-undef": "off",
74
- "arrow-body-style": "error",
75
- "func-style": ["error", "expression", { allowArrowFunctions: true }],
76
- "no-duplicate-imports": "error",
77
- "no-restricted-syntax": ["error", "SwitchStatement"],
78
- "no-useless-computed-key": "error",
79
- "no-useless-concat": "error",
80
- "no-useless-constructor": "error",
81
- "no-useless-rename": "error",
82
- "no-useless-return": "error",
83
- "no-var": "error",
84
- "object-shorthand": "error",
85
- "prefer-arrow-callback": "error",
86
- "prefer-const": "error",
87
- "prefer-template": "error",
88
- "require-await": "error",
89
- eqeqeq: "error"
90
- }
91
91
  }
92
92
  };
93
93
  // Annotate the CommonJS export names for ESM import in node:
@@ -3,6 +3,31 @@ import TSESLint from "typescript-eslint";
3
3
  import ESLintJS from "@eslint/js";
4
4
  var NeatlintOptionsDefault = {
5
5
  ignores: ["./dist/**"],
6
+ javascript: {
7
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
8
+ languageOptions: {},
9
+ plugins: {},
10
+ rules: {
11
+ ...ESLintJS.configs.recommended.rules,
12
+ "no-undef": "off",
13
+ "arrow-body-style": "error",
14
+ "func-style": ["error", "expression", { allowArrowFunctions: true }],
15
+ "no-duplicate-imports": "error",
16
+ "no-restricted-syntax": ["error", "SwitchStatement"],
17
+ "no-useless-computed-key": "error",
18
+ "no-useless-concat": "error",
19
+ "no-useless-constructor": "error",
20
+ "no-useless-rename": "error",
21
+ "no-useless-return": "error",
22
+ "no-var": "error",
23
+ "object-shorthand": "error",
24
+ "prefer-arrow-callback": "error",
25
+ "prefer-const": "error",
26
+ "prefer-template": "error",
27
+ "require-await": "error",
28
+ eqeqeq: "error"
29
+ }
30
+ },
6
31
  typescript: {
7
32
  files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
8
33
  languageOptions: {
@@ -29,31 +54,6 @@ var NeatlintOptionsDefault = {
29
54
  "@typescript-eslint/prefer-readonly": "error",
30
55
  "@typescript-eslint/strict-boolean-expressions": "error"
31
56
  }
32
- },
33
- javascript: {
34
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
35
- languageOptions: {},
36
- plugins: {},
37
- rules: {
38
- ...ESLintJS.configs.recommended.rules,
39
- "no-undef": "off",
40
- "arrow-body-style": "error",
41
- "func-style": ["error", "expression", { allowArrowFunctions: true }],
42
- "no-duplicate-imports": "error",
43
- "no-restricted-syntax": ["error", "SwitchStatement"],
44
- "no-useless-computed-key": "error",
45
- "no-useless-concat": "error",
46
- "no-useless-constructor": "error",
47
- "no-useless-rename": "error",
48
- "no-useless-return": "error",
49
- "no-var": "error",
50
- "object-shorthand": "error",
51
- "prefer-arrow-callback": "error",
52
- "prefer-const": "error",
53
- "prefer-template": "error",
54
- "require-await": "error",
55
- eqeqeq: "error"
56
- }
57
57
  }
58
58
  };
59
59
  export {
package/dist/main.js CHANGED
@@ -42,6 +42,31 @@ var import_typescript_eslint = __toESM(require("typescript-eslint"));
42
42
  var import_js = __toESM(require("@eslint/js"));
43
43
  var NeatlintOptionsDefault = {
44
44
  ignores: ["./dist/**"],
45
+ javascript: {
46
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
47
+ languageOptions: {},
48
+ plugins: {},
49
+ rules: {
50
+ ...import_js.default.configs.recommended.rules,
51
+ "no-undef": "off",
52
+ "arrow-body-style": "error",
53
+ "func-style": ["error", "expression", { allowArrowFunctions: true }],
54
+ "no-duplicate-imports": "error",
55
+ "no-restricted-syntax": ["error", "SwitchStatement"],
56
+ "no-useless-computed-key": "error",
57
+ "no-useless-concat": "error",
58
+ "no-useless-constructor": "error",
59
+ "no-useless-rename": "error",
60
+ "no-useless-return": "error",
61
+ "no-var": "error",
62
+ "object-shorthand": "error",
63
+ "prefer-arrow-callback": "error",
64
+ "prefer-const": "error",
65
+ "prefer-template": "error",
66
+ "require-await": "error",
67
+ eqeqeq: "error"
68
+ }
69
+ },
45
70
  typescript: {
46
71
  files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
47
72
  languageOptions: {
@@ -68,31 +93,6 @@ var NeatlintOptionsDefault = {
68
93
  "@typescript-eslint/prefer-readonly": "error",
69
94
  "@typescript-eslint/strict-boolean-expressions": "error"
70
95
  }
71
- },
72
- javascript: {
73
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
74
- languageOptions: {},
75
- plugins: {},
76
- rules: {
77
- ...import_js.default.configs.recommended.rules,
78
- "no-undef": "off",
79
- "arrow-body-style": "error",
80
- "func-style": ["error", "expression", { allowArrowFunctions: true }],
81
- "no-duplicate-imports": "error",
82
- "no-restricted-syntax": ["error", "SwitchStatement"],
83
- "no-useless-computed-key": "error",
84
- "no-useless-concat": "error",
85
- "no-useless-constructor": "error",
86
- "no-useless-rename": "error",
87
- "no-useless-return": "error",
88
- "no-var": "error",
89
- "object-shorthand": "error",
90
- "prefer-arrow-callback": "error",
91
- "prefer-const": "error",
92
- "prefer-template": "error",
93
- "require-await": "error",
94
- eqeqeq: "error"
95
- }
96
96
  }
97
97
  };
98
98
 
@@ -101,18 +101,18 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
101
101
  options = import_lodash.default.merge({}, NeatlintOptionsDefault, options);
102
102
  return [
103
103
  { ignores: options.ignores },
104
- {
105
- files: options.typescript?.files,
106
- languageOptions: options.typescript?.languageOptions,
107
- plugins: options.typescript?.plugins,
108
- rules: options.typescript?.rules
109
- },
110
104
  {
111
105
  files: options.javascript?.files,
112
106
  languageOptions: options.javascript?.languageOptions,
113
107
  plugins: options.javascript?.plugins,
114
108
  rules: options.javascript?.rules
115
109
  },
110
+ {
111
+ files: options.typescript?.files,
112
+ languageOptions: options.typescript?.languageOptions,
113
+ plugins: options.typescript?.plugins,
114
+ rules: options.typescript?.rules
115
+ },
116
116
  ...options.config && options.config.length !== 0 ? options.config : []
117
117
  ];
118
118
  };
package/dist/main.mjs CHANGED
@@ -6,6 +6,31 @@ import TSESLint from "typescript-eslint";
6
6
  import ESLintJS from "@eslint/js";
7
7
  var NeatlintOptionsDefault = {
8
8
  ignores: ["./dist/**"],
9
+ javascript: {
10
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
11
+ languageOptions: {},
12
+ plugins: {},
13
+ rules: {
14
+ ...ESLintJS.configs.recommended.rules,
15
+ "no-undef": "off",
16
+ "arrow-body-style": "error",
17
+ "func-style": ["error", "expression", { allowArrowFunctions: true }],
18
+ "no-duplicate-imports": "error",
19
+ "no-restricted-syntax": ["error", "SwitchStatement"],
20
+ "no-useless-computed-key": "error",
21
+ "no-useless-concat": "error",
22
+ "no-useless-constructor": "error",
23
+ "no-useless-rename": "error",
24
+ "no-useless-return": "error",
25
+ "no-var": "error",
26
+ "object-shorthand": "error",
27
+ "prefer-arrow-callback": "error",
28
+ "prefer-const": "error",
29
+ "prefer-template": "error",
30
+ "require-await": "error",
31
+ eqeqeq: "error"
32
+ }
33
+ },
9
34
  typescript: {
10
35
  files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
11
36
  languageOptions: {
@@ -32,31 +57,6 @@ var NeatlintOptionsDefault = {
32
57
  "@typescript-eslint/prefer-readonly": "error",
33
58
  "@typescript-eslint/strict-boolean-expressions": "error"
34
59
  }
35
- },
36
- javascript: {
37
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
38
- languageOptions: {},
39
- plugins: {},
40
- rules: {
41
- ...ESLintJS.configs.recommended.rules,
42
- "no-undef": "off",
43
- "arrow-body-style": "error",
44
- "func-style": ["error", "expression", { allowArrowFunctions: true }],
45
- "no-duplicate-imports": "error",
46
- "no-restricted-syntax": ["error", "SwitchStatement"],
47
- "no-useless-computed-key": "error",
48
- "no-useless-concat": "error",
49
- "no-useless-constructor": "error",
50
- "no-useless-rename": "error",
51
- "no-useless-return": "error",
52
- "no-var": "error",
53
- "object-shorthand": "error",
54
- "prefer-arrow-callback": "error",
55
- "prefer-const": "error",
56
- "prefer-template": "error",
57
- "require-await": "error",
58
- eqeqeq: "error"
59
- }
60
60
  }
61
61
  };
62
62
 
@@ -65,18 +65,18 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
65
65
  options = _.merge({}, NeatlintOptionsDefault, options);
66
66
  return [
67
67
  { ignores: options.ignores },
68
- {
69
- files: options.typescript?.files,
70
- languageOptions: options.typescript?.languageOptions,
71
- plugins: options.typescript?.plugins,
72
- rules: options.typescript?.rules
73
- },
74
68
  {
75
69
  files: options.javascript?.files,
76
70
  languageOptions: options.javascript?.languageOptions,
77
71
  plugins: options.javascript?.plugins,
78
72
  rules: options.javascript?.rules
79
73
  },
74
+ {
75
+ files: options.typescript?.files,
76
+ languageOptions: options.typescript?.languageOptions,
77
+ plugins: options.typescript?.plugins,
78
+ rules: options.typescript?.rules
79
+ },
80
80
  ...options.config && options.config.length !== 0 ? options.config : []
81
81
  ];
82
82
  };
@@ -1,12 +1,12 @@
1
1
  type NeatlintOptions = {
2
2
  ignores?: string[];
3
- typescript?: {
3
+ javascript?: {
4
4
  files?: string[];
5
5
  languageOptions?: object;
6
6
  plugins?: Record<string, unknown>;
7
7
  rules?: Record<string, string | object>;
8
8
  };
9
- javascript?: {
9
+ typescript?: {
10
10
  files?: string[];
11
11
  languageOptions?: object;
12
12
  plugins?: Record<string, unknown>;
@@ -1,12 +1,12 @@
1
1
  type NeatlintOptions = {
2
2
  ignores?: string[];
3
- typescript?: {
3
+ javascript?: {
4
4
  files?: string[];
5
5
  languageOptions?: object;
6
6
  plugins?: Record<string, unknown>;
7
7
  rules?: Record<string, string | object>;
8
8
  };
9
- javascript?: {
9
+ typescript?: {
10
10
  files?: string[];
11
11
  languageOptions?: object;
12
12
  plugins?: Record<string, unknown>;
@@ -40,6 +40,31 @@ var import_typescript_eslint = __toESM(require("typescript-eslint"));
40
40
  var import_js = __toESM(require("@eslint/js"));
41
41
  var NeatlintOptionsDefault = {
42
42
  ignores: ["./dist/**"],
43
+ javascript: {
44
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
45
+ languageOptions: {},
46
+ plugins: {},
47
+ rules: {
48
+ ...import_js.default.configs.recommended.rules,
49
+ "no-undef": "off",
50
+ "arrow-body-style": "error",
51
+ "func-style": ["error", "expression", { allowArrowFunctions: true }],
52
+ "no-duplicate-imports": "error",
53
+ "no-restricted-syntax": ["error", "SwitchStatement"],
54
+ "no-useless-computed-key": "error",
55
+ "no-useless-concat": "error",
56
+ "no-useless-constructor": "error",
57
+ "no-useless-rename": "error",
58
+ "no-useless-return": "error",
59
+ "no-var": "error",
60
+ "object-shorthand": "error",
61
+ "prefer-arrow-callback": "error",
62
+ "prefer-const": "error",
63
+ "prefer-template": "error",
64
+ "require-await": "error",
65
+ eqeqeq: "error"
66
+ }
67
+ },
43
68
  typescript: {
44
69
  files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
45
70
  languageOptions: {
@@ -66,31 +91,6 @@ var NeatlintOptionsDefault = {
66
91
  "@typescript-eslint/prefer-readonly": "error",
67
92
  "@typescript-eslint/strict-boolean-expressions": "error"
68
93
  }
69
- },
70
- javascript: {
71
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
72
- languageOptions: {},
73
- plugins: {},
74
- rules: {
75
- ...import_js.default.configs.recommended.rules,
76
- "no-undef": "off",
77
- "arrow-body-style": "error",
78
- "func-style": ["error", "expression", { allowArrowFunctions: true }],
79
- "no-duplicate-imports": "error",
80
- "no-restricted-syntax": ["error", "SwitchStatement"],
81
- "no-useless-computed-key": "error",
82
- "no-useless-concat": "error",
83
- "no-useless-constructor": "error",
84
- "no-useless-rename": "error",
85
- "no-useless-return": "error",
86
- "no-var": "error",
87
- "object-shorthand": "error",
88
- "prefer-arrow-callback": "error",
89
- "prefer-const": "error",
90
- "prefer-template": "error",
91
- "require-await": "error",
92
- eqeqeq: "error"
93
- }
94
94
  }
95
95
  };
96
96
 
@@ -99,18 +99,18 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
99
99
  options = import_lodash.default.merge({}, NeatlintOptionsDefault, options);
100
100
  return [
101
101
  { ignores: options.ignores },
102
- {
103
- files: options.typescript?.files,
104
- languageOptions: options.typescript?.languageOptions,
105
- plugins: options.typescript?.plugins,
106
- rules: options.typescript?.rules
107
- },
108
102
  {
109
103
  files: options.javascript?.files,
110
104
  languageOptions: options.javascript?.languageOptions,
111
105
  plugins: options.javascript?.plugins,
112
106
  rules: options.javascript?.rules
113
107
  },
108
+ {
109
+ files: options.typescript?.files,
110
+ languageOptions: options.typescript?.languageOptions,
111
+ plugins: options.typescript?.plugins,
112
+ rules: options.typescript?.rules
113
+ },
114
114
  ...options.config && options.config.length !== 0 ? options.config : []
115
115
  ];
116
116
  };
@@ -6,6 +6,31 @@ import TSESLint from "typescript-eslint";
6
6
  import ESLintJS from "@eslint/js";
7
7
  var NeatlintOptionsDefault = {
8
8
  ignores: ["./dist/**"],
9
+ javascript: {
10
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
11
+ languageOptions: {},
12
+ plugins: {},
13
+ rules: {
14
+ ...ESLintJS.configs.recommended.rules,
15
+ "no-undef": "off",
16
+ "arrow-body-style": "error",
17
+ "func-style": ["error", "expression", { allowArrowFunctions: true }],
18
+ "no-duplicate-imports": "error",
19
+ "no-restricted-syntax": ["error", "SwitchStatement"],
20
+ "no-useless-computed-key": "error",
21
+ "no-useless-concat": "error",
22
+ "no-useless-constructor": "error",
23
+ "no-useless-rename": "error",
24
+ "no-useless-return": "error",
25
+ "no-var": "error",
26
+ "object-shorthand": "error",
27
+ "prefer-arrow-callback": "error",
28
+ "prefer-const": "error",
29
+ "prefer-template": "error",
30
+ "require-await": "error",
31
+ eqeqeq: "error"
32
+ }
33
+ },
9
34
  typescript: {
10
35
  files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
11
36
  languageOptions: {
@@ -32,31 +57,6 @@ var NeatlintOptionsDefault = {
32
57
  "@typescript-eslint/prefer-readonly": "error",
33
58
  "@typescript-eslint/strict-boolean-expressions": "error"
34
59
  }
35
- },
36
- javascript: {
37
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
38
- languageOptions: {},
39
- plugins: {},
40
- rules: {
41
- ...ESLintJS.configs.recommended.rules,
42
- "no-undef": "off",
43
- "arrow-body-style": "error",
44
- "func-style": ["error", "expression", { allowArrowFunctions: true }],
45
- "no-duplicate-imports": "error",
46
- "no-restricted-syntax": ["error", "SwitchStatement"],
47
- "no-useless-computed-key": "error",
48
- "no-useless-concat": "error",
49
- "no-useless-constructor": "error",
50
- "no-useless-rename": "error",
51
- "no-useless-return": "error",
52
- "no-var": "error",
53
- "object-shorthand": "error",
54
- "prefer-arrow-callback": "error",
55
- "prefer-const": "error",
56
- "prefer-template": "error",
57
- "require-await": "error",
58
- eqeqeq: "error"
59
- }
60
60
  }
61
61
  };
62
62
 
@@ -65,18 +65,18 @@ var Neatlint = (options = NeatlintOptionsDefault) => {
65
65
  options = _.merge({}, NeatlintOptionsDefault, options);
66
66
  return [
67
67
  { ignores: options.ignores },
68
- {
69
- files: options.typescript?.files,
70
- languageOptions: options.typescript?.languageOptions,
71
- plugins: options.typescript?.plugins,
72
- rules: options.typescript?.rules
73
- },
74
68
  {
75
69
  files: options.javascript?.files,
76
70
  languageOptions: options.javascript?.languageOptions,
77
71
  plugins: options.javascript?.plugins,
78
72
  rules: options.javascript?.rules
79
73
  },
74
+ {
75
+ files: options.typescript?.files,
76
+ languageOptions: options.typescript?.languageOptions,
77
+ plugins: options.typescript?.plugins,
78
+ rules: options.typescript?.rules
79
+ },
80
80
  ...options.config && options.config.length !== 0 ? options.config : []
81
81
  ];
82
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neatlint",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Strict ESLint presets for modern TypeScript projects.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/keift/neatlint",