@kazupon/eslint-config 0.7.0 → 0.8.0

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
@@ -14,6 +14,7 @@ ESLint config for @kazupon
14
14
  - `typescript`
15
15
  - `jsdoc`
16
16
  - `regexp`
17
+ - `promise`
17
18
  - `unicorn`
18
19
  - `prettier`
19
20
  - `jsonc`
@@ -96,18 +97,19 @@ Add the following settings to your `.vscode/settings.json`:
96
97
 
97
98
  The following built-in configurations are supported:
98
99
 
99
- | Configuration | Powered by eslint plugin or package | Need to install eslint plugin or package? |
100
- | ------------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------- |
101
- | `javascript` | [`@eslint/js`](https://www.npmjs.com/package/@eslint/js) | no (built-in) |
102
- | `comments` | [`eslint-plugin-eslint-comments`](https://www.npmjs.com/package/eslint-plugin-eslint-comments) | no (built-in) |
103
- | `typescript` | [`typescript-eslint`](https://www.npmjs.com/package/typescript-eslint) | yes |
104
- | `jsdoc` | [`eslint-plugin-jsdoc`](https://www.npmjs.com/package/eslint-plugin-jsdoc) | yes |
105
- | `regexp` | [`eslint-plugin-regexp`](https://www.npmjs.com/package/eslint-plugin-regexp) | yes |
106
- | `unicorn` | [`eslint-plugin-unicorn`](https://www.npmjs.com/package/eslint-plugin-unicorn) | yes |
107
- | `prettier` | [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier) | yes |
108
- | `jsonc` | [`eslint-plugin-jsonc`](https://www.npmjs.com/package/eslint-plugin-jsonc) | yes |
109
- | `vue` | [`eslint-plugin-vue`](https://www.npmjs.com/package/eslint-plugin-vue) | yes |
110
- | `yml` | [`eslint-plugin-yml`](https://www.npmjs.com/package/eslint-plugin-yml) | yes |
100
+ | Configuration | Powered by eslint plugin or package | Need to install eslint plugin or package? |
101
+ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
102
+ | `javascript` | [`@eslint/js`](https://www.npmjs.com/package/@eslint/js) | no (built-in) |
103
+ | `comments` | [`@eslint-community/eslint-plugin-eslint-comments`](https://www.npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments) | no (built-in) |
104
+ | `typescript` | [`typescript-eslint`](https://www.npmjs.com/package/typescript-eslint) | yes |
105
+ | `jsdoc` | [`eslint-plugin-jsdoc`](https://www.npmjs.com/package/eslint-plugin-jsdoc) | yes |
106
+ | `regexp` | [`eslint-plugin-regexp`](https://www.npmjs.com/package/eslint-plugin-regexp) | yes |
107
+ | `promise` | [`eslint-plugin-promise`](https://www.npmjs.com/package/eslint-plugin-promise) | yes |
108
+ | `unicorn` | [`eslint-plugin-unicorn`](https://www.npmjs.com/package/eslint-plugin-unicorn) | yes |
109
+ | `prettier` | [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier) | yes |
110
+ | `jsonc` | [`eslint-plugin-jsonc`](https://www.npmjs.com/package/eslint-plugin-jsonc) | yes |
111
+ | `vue` | [`eslint-plugin-vue`](https://www.npmjs.com/package/eslint-plugin-vue) | yes |
112
+ | `yml` | [`eslint-plugin-yml`](https://www.npmjs.com/package/eslint-plugin-yml) | yes |
111
113
 
112
114
  You can use `import` syntax:
113
115
 
@@ -2,6 +2,7 @@ export * from './javascript';
2
2
  export * from './comments';
3
3
  export * from './typescript';
4
4
  export * from './jsdoc';
5
+ export * from './promise';
5
6
  export * from './regexp';
6
7
  export * from './unicorn';
7
8
  export * from './prettier';
@@ -2,6 +2,7 @@ export * from './javascript';
2
2
  export * from './comments';
3
3
  export * from './typescript';
4
4
  export * from './jsdoc';
5
+ export * from './promise';
5
6
  export * from './regexp';
6
7
  export * from './unicorn';
7
8
  export * from './prettier';
@@ -0,0 +1,4 @@
1
+ import type { Linter } from 'eslint';
2
+ import type { OverridesOptions } from '../types';
3
+ export interface PromiseOptions {}
4
+ export declare function promise(options?: ((PromiseOptions) & (OverridesOptions))): Promise<(Linter.FlatConfig)[]>;
@@ -0,0 +1,4 @@
1
+ import type { Linter } from 'eslint';
2
+ import type { OverridesOptions } from '../types';
3
+ export interface PromiseOptions {}
4
+ export declare function promise(options?: ((PromiseOptions) & (OverridesOptions))): Promise<(Linter.FlatConfig)[]>;
package/dist/index.cjs CHANGED
@@ -82,10 +82,10 @@ async function javascript(options = {}) {
82
82
  //#region src/configs/comments.ts
83
83
  async function comments(options = {}) {
84
84
  const { rules: overrideRules = {} } = options;
85
- const comments$1 = await loadPlugin('eslint-plugin-eslint-comments');
85
+ const comments$1 = await loadPlugin('@eslint-community/eslint-plugin-eslint-comments');
86
86
  return [{
87
- name: 'eslint-comments/recommended',
88
- plugins: {'eslint-comments': comments$1},
87
+ name: '@eslint-community/eslint-comments/recommended',
88
+ plugins: {'@eslint-community/eslint-comments': comments$1},
89
89
  rules: {...(comments$1.configs.recommended.rules)}
90
90
  }, {
91
91
  name: '@kazupon/eslint-comments',
@@ -163,6 +163,20 @@ async function jsdoc(options = {}) {
163
163
  }];
164
164
  }
165
165
 
166
+ //#endregion
167
+ //#region src/configs/promise.ts
168
+ async function promise(options = {}) {
169
+ const { rules: overrideRules = {} } = options;
170
+ const promise$1 = await loadPlugin('eslint-plugin-promise');
171
+ return [{
172
+ name: 'promise/flat/recommended',
173
+ ...(promise$1.configs['flat/recommended'])
174
+ }, {
175
+ name: '@kazupon/promise',
176
+ rules: {...overrideRules}
177
+ }];
178
+ }
179
+
166
180
  //#endregion
167
181
  //#region src/configs/regexp.ts
168
182
  async function regexp(options = {}) {
@@ -313,6 +327,7 @@ exports.javascript = javascript;
313
327
  exports.jsdoc = jsdoc;
314
328
  exports.jsonc = jsonc;
315
329
  exports.prettier = prettier;
330
+ exports.promise = promise;
316
331
  exports.regexp = regexp;
317
332
  exports.typescript = typescript;
318
333
  exports.unicorn = unicorn;
package/dist/index.js CHANGED
@@ -57,10 +57,10 @@ async function javascript(options = {}) {
57
57
  //#region src/configs/comments.ts
58
58
  async function comments(options = {}) {
59
59
  const { rules: overrideRules = {} } = options;
60
- const comments$1 = await loadPlugin('eslint-plugin-eslint-comments');
60
+ const comments$1 = await loadPlugin('@eslint-community/eslint-plugin-eslint-comments');
61
61
  return [{
62
- name: 'eslint-comments/recommended',
63
- plugins: {'eslint-comments': comments$1},
62
+ name: '@eslint-community/eslint-comments/recommended',
63
+ plugins: {'@eslint-community/eslint-comments': comments$1},
64
64
  rules: {...(comments$1.configs.recommended.rules)}
65
65
  }, {
66
66
  name: '@kazupon/eslint-comments',
@@ -138,6 +138,20 @@ async function jsdoc(options = {}) {
138
138
  }];
139
139
  }
140
140
 
141
+ //#endregion
142
+ //#region src/configs/promise.ts
143
+ async function promise(options = {}) {
144
+ const { rules: overrideRules = {} } = options;
145
+ const promise$1 = await loadPlugin('eslint-plugin-promise');
146
+ return [{
147
+ name: 'promise/flat/recommended',
148
+ ...(promise$1.configs['flat/recommended'])
149
+ }, {
150
+ name: '@kazupon/promise',
151
+ rules: {...overrideRules}
152
+ }];
153
+ }
154
+
141
155
  //#endregion
142
156
  //#region src/configs/regexp.ts
143
157
  async function regexp(options = {}) {
@@ -281,4 +295,4 @@ async function vue(options = {}) {
281
295
  }
282
296
 
283
297
  //#endregion
284
- export { comments, defineConfig, javascript, jsdoc, jsonc, prettier, regexp, typescript, unicorn, vue, yaml, yml };
298
+ export { comments, defineConfig, javascript, jsdoc, jsonc, prettier, promise, regexp, typescript, unicorn, vue, yaml, yml };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kazupon/eslint-config",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "ESLint config for @kazupon",
5
5
  "keywords": [
6
6
  "config",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@eslint/js": "^9.0.0",
40
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
40
41
  "eslint-flat-config-utils": "^0.2.5",
41
- "eslint-plugin-eslint-comments": "^3.2.0",
42
42
  "globals": "^15.8.0"
43
43
  },
44
44
  "peerDependencies": {
@@ -46,6 +46,7 @@
46
46
  "eslint-config-prettier": ">=9.1.0",
47
47
  "eslint-plugin-jsdoc": ">=48.5.0",
48
48
  "eslint-plugin-jsonc": ">=2.16.0",
49
+ "eslint-plugin-promise": ">=6.4.0",
49
50
  "eslint-plugin-regexp": ">=2.6.0",
50
51
  "eslint-plugin-unicorn": ">=54.0.0",
51
52
  "eslint-plugin-vue": ">=9.24.0",
@@ -62,6 +63,9 @@
62
63
  "eslint-plugin-jsonc": {
63
64
  "optional": true
64
65
  },
66
+ "eslint-plugin-promise": {
67
+ "optional": true
68
+ },
65
69
  "eslint-plugin-regexp": {
66
70
  "optional": true
67
71
  },
@@ -87,6 +91,7 @@
87
91
  "eslint-config-prettier": "^9.1.0",
88
92
  "eslint-plugin-jsdoc": "^48.5.2",
89
93
  "eslint-plugin-jsonc": "^2.16.0",
94
+ "eslint-plugin-promise": "^6.4.0",
90
95
  "eslint-plugin-regexp": "^2.6.0",
91
96
  "eslint-plugin-unicorn": "^54.0.0",
92
97
  "eslint-plugin-vue": "^9.27.0",