@ota-meshi/eslint-plugin 0.10.0 → 0.11.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.
@@ -1,152 +1,151 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
- const { getProject } = require("./ts")
3
+ const { getProject } = require("./ts");
4
4
  module.exports = require("../utils/module").requireOf(
5
- [
6
- "@typescript-eslint/parser",
7
- "typescript",
8
- "@typescript-eslint/eslint-plugin",
9
- ],
10
- () => ({
11
- overrides: [
12
- {
13
- files: ["*.ts"],
14
- extends: ["plugin:@typescript-eslint/recommended"],
15
- parser: require.resolve("@typescript-eslint/parser"),
16
- parserOptions: {
17
- sourceType: "module",
18
- project: getProject(),
19
- },
20
- rules: {
21
- "@typescript-eslint/array-type": "error",
22
- "@typescript-eslint/explicit-module-boundary-types": [
23
- "error",
24
- { allowArgumentsExplicitlyTypedAsAny: true },
25
- ],
26
- "@typescript-eslint/consistent-type-imports": "error",
27
-
28
- "@typescript-eslint/adjacent-overload-signatures": "error",
29
- "@typescript-eslint/await-thenable": "error",
30
- "@typescript-eslint/ban-ts-comment": "error",
31
- "@typescript-eslint/naming-convention": [
32
- "error",
33
- {
34
- selector: "default",
35
- format: ["camelCase"],
36
- leadingUnderscore: "allow",
37
- trailingUnderscore: "allow",
38
- },
39
- {
40
- selector: "variable",
41
- format: ["camelCase", "UPPER_CASE"],
42
- leadingUnderscore: "allow",
43
- trailingUnderscore: "allow",
44
- },
45
- {
46
- selector: "typeLike",
47
- format: ["PascalCase"],
48
- },
49
- {
50
- selector: "memberLike",
51
- format: ["camelCase", "UPPER_CASE"],
52
- leadingUnderscore: "allow",
53
- trailingUnderscore: "allow",
54
- },
55
- {
56
- selector: "property",
57
- format: null,
58
- },
59
- {
60
- selector: "method",
61
- format: null,
62
- },
63
- ],
64
- "@typescript-eslint/consistent-type-assertions": "error",
65
- "@typescript-eslint/explicit-member-accessibility": "error",
66
- "@typescript-eslint/no-array-constructor": "error",
67
- "@typescript-eslint/no-empty-interface": "error",
68
- "@typescript-eslint/no-extraneous-class": "error",
69
- "@typescript-eslint/no-floating-promises": "error",
70
- "@typescript-eslint/no-for-in-array": "error",
71
- "@typescript-eslint/no-inferrable-types": "error",
72
- "@typescript-eslint/no-misused-new": "error",
73
- "@typescript-eslint/no-misused-promises": "error",
74
- "@typescript-eslint/no-parameter-properties": "error",
75
- "@typescript-eslint/no-require-imports": "error",
76
- "@typescript-eslint/no-this-alias": [
77
- "error",
78
- { allowDestructuring: true },
79
- ],
80
- "@typescript-eslint/no-unnecessary-qualifier": "error",
81
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
82
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
83
- "@typescript-eslint/no-var-requires": "error",
84
- "@typescript-eslint/prefer-function-type": "error",
85
- "@typescript-eslint/prefer-includes": "error",
86
- "@typescript-eslint/prefer-namespace-keyword": "error",
87
- "@typescript-eslint/prefer-readonly": "error",
88
- "@typescript-eslint/prefer-regexp-exec": "error",
89
- "@typescript-eslint/prefer-string-starts-ends-with":
90
- "error",
91
- "@typescript-eslint/restrict-plus-operands": "error",
92
- "@typescript-eslint/require-array-sort-compare": "error",
93
- "@typescript-eslint/triple-slash-reference": "error",
94
- "@typescript-eslint/unbound-method": [
95
- "error",
96
- { ignoreStatic: true },
97
- ],
98
- "@typescript-eslint/unified-signatures": "error",
99
- "prettier/prettier": [
100
- "error",
101
- {
102
- tabWidth: 4,
103
- semi: false,
104
- trailingComma: "all",
105
- parser: "typescript",
106
- },
107
- {
108
- usePrettierrc: false,
109
- },
110
- ],
5
+ [
6
+ "@typescript-eslint/parser",
7
+ "typescript",
8
+ "@typescript-eslint/eslint-plugin",
9
+ ],
10
+ () => ({
11
+ overrides: [
12
+ {
13
+ files: ["*.ts"],
14
+ extends: ["plugin:@typescript-eslint/recommended"],
15
+ parser: require.resolve("@typescript-eslint/parser"),
16
+ parserOptions: {
17
+ sourceType: "module",
18
+ project: getProject(),
19
+ },
20
+ rules: {
21
+ "@typescript-eslint/array-type": "error",
22
+ "@typescript-eslint/explicit-module-boundary-types": [
23
+ "error",
24
+ { allowArgumentsExplicitlyTypedAsAny: true },
25
+ ],
26
+ "@typescript-eslint/consistent-type-imports": "error",
111
27
 
112
- // Replacements
113
- camelcase: "off",
114
- // "@typescript-eslint/camelcase": "error",
115
- "no-empty-function": "off",
116
- "@typescript-eslint/no-empty-function": "error",
117
- "no-useless-constructor": "off",
118
- "@typescript-eslint/no-useless-constructor": "error",
119
- "require-await": "off",
120
- "@typescript-eslint/require-await": "error",
121
- "no-use-before-define": "off",
122
- "@typescript-eslint/no-use-before-define": [
123
- "error",
124
- {
125
- functions: false,
126
- classes: true,
127
- variables: true,
128
- ignoreTypeReferences: true,
129
- },
130
- ],
131
- "no-unused-vars": "off",
132
- "@typescript-eslint/no-unused-vars": [
133
- "error",
134
- { argsIgnorePattern: "^_" },
135
- ],
136
- },
28
+ "@typescript-eslint/adjacent-overload-signatures": "error",
29
+ "@typescript-eslint/await-thenable": "error",
30
+ "@typescript-eslint/ban-ts-comment": "error",
31
+ "@typescript-eslint/naming-convention": [
32
+ "error",
33
+ {
34
+ selector: "default",
35
+ format: ["camelCase"],
36
+ leadingUnderscore: "allow",
37
+ trailingUnderscore: "allow",
38
+ },
39
+ {
40
+ selector: "variable",
41
+ format: ["camelCase", "UPPER_CASE"],
42
+ leadingUnderscore: "allow",
43
+ trailingUnderscore: "allow",
44
+ },
45
+ {
46
+ selector: "typeLike",
47
+ format: ["PascalCase"],
48
+ },
49
+ {
50
+ selector: "memberLike",
51
+ format: ["camelCase", "UPPER_CASE"],
52
+ leadingUnderscore: "allow",
53
+ trailingUnderscore: "allow",
137
54
  },
138
55
  {
139
- files: ["test/**/*.ts", "tests/**/*.ts"],
140
- rules: {
141
- "@typescript-eslint/no-explicit-any": "off",
142
- },
56
+ selector: "property",
57
+ format: null,
143
58
  },
144
- ],
59
+ {
60
+ selector: "method",
61
+ format: null,
62
+ },
63
+ ],
64
+ "@typescript-eslint/consistent-type-assertions": "error",
65
+ "@typescript-eslint/explicit-member-accessibility": "error",
66
+ "@typescript-eslint/no-array-constructor": "error",
67
+ "@typescript-eslint/no-empty-interface": "error",
68
+ "@typescript-eslint/no-extraneous-class": "error",
69
+ "@typescript-eslint/no-floating-promises": "error",
70
+ "@typescript-eslint/no-for-in-array": "error",
71
+ "@typescript-eslint/no-inferrable-types": "error",
72
+ "@typescript-eslint/no-misused-new": "error",
73
+ "@typescript-eslint/no-misused-promises": "error",
74
+ "@typescript-eslint/no-parameter-properties": "error",
75
+ "@typescript-eslint/no-require-imports": "error",
76
+ "@typescript-eslint/no-this-alias": [
77
+ "error",
78
+ { allowDestructuring: true },
79
+ ],
80
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
81
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
82
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
83
+ "@typescript-eslint/no-var-requires": "error",
84
+ "@typescript-eslint/prefer-function-type": "error",
85
+ "@typescript-eslint/prefer-includes": "error",
86
+ "@typescript-eslint/prefer-namespace-keyword": "error",
87
+ "@typescript-eslint/prefer-readonly": "error",
88
+ "@typescript-eslint/prefer-regexp-exec": "error",
89
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
90
+ "@typescript-eslint/restrict-plus-operands": "error",
91
+ "@typescript-eslint/require-array-sort-compare": "error",
92
+ "@typescript-eslint/triple-slash-reference": "error",
93
+ "@typescript-eslint/unbound-method": [
94
+ "error",
95
+ { ignoreStatic: true },
96
+ ],
97
+ "@typescript-eslint/unified-signatures": "error",
98
+ "prettier/prettier": [
99
+ "error",
100
+ {
101
+ tabWidth: 4,
102
+ semi: false,
103
+ trailingComma: "all",
104
+ parser: "typescript",
105
+ },
106
+ {
107
+ usePrettierrc: false,
108
+ },
109
+ ],
110
+
111
+ // Replacements
112
+ camelcase: "off",
113
+ // "@typescript-eslint/camelcase": "error",
114
+ "no-empty-function": "off",
115
+ "@typescript-eslint/no-empty-function": "error",
116
+ "no-useless-constructor": "off",
117
+ "@typescript-eslint/no-useless-constructor": "error",
118
+ "require-await": "off",
119
+ "@typescript-eslint/require-await": "error",
120
+ "no-use-before-define": "off",
121
+ "@typescript-eslint/no-use-before-define": [
122
+ "error",
123
+ {
124
+ functions: false,
125
+ classes: true,
126
+ variables: true,
127
+ ignoreTypeReferences: true,
128
+ },
129
+ ],
130
+ "no-unused-vars": "off",
131
+ "@typescript-eslint/no-unused-vars": [
132
+ "error",
133
+ { argsIgnorePattern: "^_" },
134
+ ],
135
+ },
136
+ },
137
+ {
138
+ files: ["test/**/*.ts", "tests/**/*.ts"],
139
+ rules: {
140
+ "@typescript-eslint/no-explicit-any": "off",
141
+ },
142
+ },
143
+ ],
144
+ }),
145
+ {
146
+ files: ["*.ts"],
147
+ fallback: () => ({
148
+ processor: "@ota-meshi/missing-parser",
145
149
  }),
146
- {
147
- files: ["*.ts"],
148
- fallback: () => ({
149
- processor: "@ota-meshi/missing-parser",
150
- }),
151
- },
152
- )
150
+ }
151
+ );
@@ -1,29 +1,29 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
- const { getProject } = require("./ts")
3
+ const { getProject } = require("./ts");
4
4
  module.exports = require("../utils/module").requireOf(
5
- ["eslint-plugin-vue", "vue-eslint-parser"],
6
- () => ({
7
- extends: ["plugin:vue/recommended"],
8
- overrides: [
9
- {
10
- files: ["*.vue"],
11
- parser: require.resolve("vue-eslint-parser"),
12
- parserOptions: {
13
- parser: {
14
- ts: "@typescript-eslint/parser",
15
- },
16
- sourceType: "module",
17
- project: getProject(),
18
- extraFileExtensions: [".vue"],
19
- },
20
- },
21
- ],
22
- }),
23
- {
5
+ ["eslint-plugin-vue", "vue-eslint-parser"],
6
+ () => ({
7
+ extends: ["plugin:vue/recommended"],
8
+ overrides: [
9
+ {
24
10
  files: ["*.vue"],
25
- fallback: () => ({
26
- processor: "@ota-meshi/missing-parser",
27
- }),
28
- },
29
- )
11
+ parser: require.resolve("vue-eslint-parser"),
12
+ parserOptions: {
13
+ parser: {
14
+ ts: "@typescript-eslint/parser",
15
+ },
16
+ sourceType: "module",
17
+ project: getProject(),
18
+ extraFileExtensions: [".vue"],
19
+ },
20
+ },
21
+ ],
22
+ }),
23
+ {
24
+ files: ["*.vue"],
25
+ fallback: () => ({
26
+ processor: "@ota-meshi/missing-parser",
27
+ }),
28
+ }
29
+ );
@@ -1,29 +1,29 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
- const { getProject } = require("./ts")
3
+ const { getProject } = require("./ts");
4
4
  module.exports = require("../utils/module").requireOf(
5
- ["eslint-plugin-vue", "vue-eslint-parser"],
6
- () => ({
7
- extends: ["plugin:vue/vue3-recommended"],
8
- overrides: [
9
- {
10
- files: ["*.vue"],
11
- parser: require.resolve("vue-eslint-parser"),
12
- parserOptions: {
13
- parser: {
14
- ts: "@typescript-eslint/parser",
15
- },
16
- sourceType: "module",
17
- project: getProject(),
18
- extraFileExtensions: [".vue"],
19
- },
20
- },
21
- ],
22
- }),
23
- {
5
+ ["eslint-plugin-vue", "vue-eslint-parser"],
6
+ () => ({
7
+ extends: ["plugin:vue/vue3-recommended"],
8
+ overrides: [
9
+ {
24
10
  files: ["*.vue"],
25
- fallback: () => ({
26
- processor: "@ota-meshi/missing-parser",
27
- }),
28
- },
29
- )
11
+ parser: require.resolve("vue-eslint-parser"),
12
+ parserOptions: {
13
+ parser: {
14
+ ts: "@typescript-eslint/parser",
15
+ },
16
+ sourceType: "module",
17
+ project: getProject(),
18
+ extraFileExtensions: [".vue"],
19
+ },
20
+ },
21
+ ],
22
+ }),
23
+ {
24
+ files: ["*.vue"],
25
+ fallback: () => ({
26
+ processor: "@ota-meshi/missing-parser",
27
+ }),
28
+ }
29
+ );
@@ -1,25 +1,25 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
3
  module.exports = require("../utils/module").requireOf(
4
- ["eslint-plugin-yml"],
5
- () => ({
6
- overrides: [
7
- {
8
- files: ["*.yaml", "*.yml"],
9
- extends: [
10
- "plugin:yml/standard",
11
- require.resolve("./json-schema/config"),
12
- ],
13
- rules: {
14
- "yml/require-string-key": "error",
15
- },
16
- },
4
+ ["eslint-plugin-yml"],
5
+ () => ({
6
+ overrides: [
7
+ {
8
+ files: ["*.yaml", "*.yml"],
9
+ extends: [
10
+ "plugin:yml/standard",
11
+ require.resolve("./json-schema/config"),
17
12
  ],
13
+ rules: {
14
+ "yml/require-string-key": "error",
15
+ },
16
+ },
17
+ ],
18
+ }),
19
+ {
20
+ files: ["*.yaml", "*.yml"],
21
+ fallback: () => ({
22
+ processor: "@ota-meshi/missing-parser",
18
23
  }),
19
- {
20
- files: ["*.yaml", "*.yml"],
21
- fallback: () => ({
22
- processor: "@ota-meshi/missing-parser",
23
- }),
24
- },
25
- )
24
+ }
25
+ );
@@ -1,12 +1,12 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
3
  module.exports = require("../../utils/module").requireOf(
4
- ["eslint-plugin-eslint-comments@3.2.0"],
5
- () => ({
6
- extends: ["plugin:eslint-comments/recommended"],
7
- rules: {
8
- "eslint-comments/require-description": "error",
9
- "eslint-comments/no-unused-disable": "error",
10
- },
11
- }),
12
- )
4
+ ["eslint-plugin-eslint-comments@3.2.0"],
5
+ () => ({
6
+ extends: ["plugin:eslint-comments/recommended"],
7
+ rules: {
8
+ "eslint-comments/require-description": "error",
9
+ "eslint-comments/no-unused-disable": "error",
10
+ },
11
+ })
12
+ );
@@ -1,15 +1,15 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
3
  module.exports = require("../../utils/module").requireOf(
4
- ["eslint-plugin-regexp@1.0.0"],
5
- () => ({
6
- extends: ["plugin:regexp/recommended"],
7
- rules: {
8
- "regexp/letter-case": ["error"],
9
- "regexp/prefer-quantifier": "error",
10
- "regexp/prefer-regexp-exec": "error",
11
- "regexp/prefer-regexp-test": "error",
12
- "regexp/sort-character-class-elements": ["error"],
13
- },
14
- }),
15
- )
4
+ ["eslint-plugin-regexp@1.0.0"],
5
+ () => ({
6
+ extends: ["plugin:regexp/recommended"],
7
+ rules: {
8
+ "regexp/letter-case": ["error"],
9
+ "regexp/prefer-quantifier": "error",
10
+ "regexp/prefer-regexp-exec": "error",
11
+ "regexp/prefer-regexp-test": "error",
12
+ "regexp/sort-character-class-elements": ["error"],
13
+ },
14
+ })
15
+ );
@@ -1,36 +1,36 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
3
  module.exports = require("../../utils/module").requireOf(
4
- ["eslint-plugin-json-schema-validator"],
5
- () => ({
6
- extends: ["plugin:json-schema-validator/recommended"],
7
- rules: {
8
- "json-schema-validator/no-invalid": [
9
- "error",
10
- {
11
- schemas: [
12
- {
13
- fileMatch: [".eslintrc.js"],
14
- schema: "https://json.schemastore.org/eslintrc",
15
- },
16
- {
17
- fileMatch: [".prettierrc.toml"],
18
- schema: "https://json.schemastore.org/prettierrc",
19
- },
20
- {
21
- fileMatch: [
22
- "stylelint.config.js",
23
- "stylelint.config.cjs",
24
- ".stylelintrc.js",
25
- ".stylelintrc.yaml",
26
- ".stylelintrc.yml",
27
- ],
28
- schema: "https://json.schemastore.org/stylelintrc",
29
- },
30
- ],
31
- useSchemastoreCatalog: true,
32
- },
33
- ],
4
+ ["eslint-plugin-json-schema-validator"],
5
+ () => ({
6
+ extends: ["plugin:json-schema-validator/recommended"],
7
+ rules: {
8
+ "json-schema-validator/no-invalid": [
9
+ "error",
10
+ {
11
+ schemas: [
12
+ {
13
+ fileMatch: [".eslintrc.js"],
14
+ schema: "https://json.schemastore.org/eslintrc",
15
+ },
16
+ {
17
+ fileMatch: [".prettierrc.toml"],
18
+ schema: "https://json.schemastore.org/prettierrc",
19
+ },
20
+ {
21
+ fileMatch: [
22
+ "stylelint.config.js",
23
+ "stylelint.config.cjs",
24
+ ".stylelintrc.js",
25
+ ".stylelintrc.yaml",
26
+ ".stylelintrc.yml",
27
+ ],
28
+ schema: "https://json.schemastore.org/stylelintrc",
29
+ },
30
+ ],
31
+ useSchemastoreCatalog: true,
34
32
  },
35
- }),
36
- )
33
+ ],
34
+ },
35
+ })
36
+ );