Skip to content

Commit 1f8fdc8

Browse files
authored
feat: export flat/recommended-script and flat/recommended-module (#113)
`eslint-plugin-n/configs/recommended-script` & `eslint-plugin-n/configs/recommended-module` are deprecated and may be removed in future majors.
1 parent 20d2713 commit 1f8fdc8

27 files changed

+192
-271
lines changed

β€Ž.eslint-doc-generatorrc.jsβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"use strict"
2+
const config = {
3+
urlConfigs: "https://github.com/eslint-community/eslint-plugin-n#-configs",
4+
configEmoji: [
5+
["recommended-script", "βœ…"],
6+
["recommended-module", "🟒"],
7+
["recommended", "β˜‘οΈ"],
8+
["flat/recommended-script", "βœ…"],
9+
["flat/recommended-module", "🟒"],
10+
],
11+
}
12+
13+
module.exports = config

β€Ž.eslintrc.jsβ€Ž

Lines changed: 0 additions & 102 deletions
This file was deleted.

β€ŽREADME.mdβ€Ž

Lines changed: 56 additions & 67 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
/**
22
* @fileoverview the `recommended-module` config for `eslint.config.js`
33
* @author ε”―η„Ά<[email protected]>
4+
* @deprecated use `flat/recommended-module` instead
45
*/
56

67
"use strict"
78

8-
const mod = require("../lib/index.js")
9-
10-
module.exports = {
11-
plugins: { n: mod },
12-
languageOptions: {
13-
sourceType: "module",
14-
globals: mod.configs["recommended-module"].globals,
15-
},
16-
rules: mod.configs["recommended-module"].rules,
17-
}
9+
module.exports = require("../lib/index.js").configs["flat/recommended-module"]
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
/**
22
* @fileoverview the `recommended-script` config for `eslint.config.js`
33
* @author ε”―η„Ά<[email protected]>
4+
* @deprecated use `flat/recommended-script` instead
45
*/
56

67
"use strict"
78

8-
const mod = require("../lib/index.js")
9-
10-
module.exports = {
11-
plugins: { n: mod },
12-
languageOptions: {
13-
sourceType: "commonjs",
14-
globals: mod.configs["recommended-script"].globals,
15-
},
16-
rules: mod.configs["recommended-script"].rules,
17-
}
9+
module.exports = require("../lib/index.js").configs["flat/recommended-script"]

β€Ždocs/rules/no-deprecated-api.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow deprecated APIs (`n/no-deprecated-api`)
22

3-
πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/eslint-community/eslint-plugin-n#-configs).
3+
πŸ’Ό This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-n#-configs): 🟒 `flat/recommended-module`, βœ… `flat/recommended-script`, β˜‘οΈ `recommended`, 🟒 `recommended-module`, βœ… `recommended-script`.
44

55
<!-- end auto-generated rule header -->
66

β€Ždocs/rules/no-exports-assign.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow the assignment to `exports` (`n/no-exports-assign`)
22

3-
πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/eslint-community/eslint-plugin-n#-configs).
3+
πŸ’Ό This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-n#-configs): 🟒 `flat/recommended-module`, βœ… `flat/recommended-script`, β˜‘οΈ `recommended`, 🟒 `recommended-module`, βœ… `recommended-script`.
44

55
<!-- end auto-generated rule header -->
66

β€Ždocs/rules/no-extraneous-import.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow `import` declarations which import extraneous modules (`n/no-extraneous-import`)
22

3-
πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/eslint-community/eslint-plugin-n#-configs).
3+
πŸ’Ό This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-n#-configs): 🟒 `flat/recommended-module`, βœ… `flat/recommended-script`, β˜‘οΈ `recommended`, 🟒 `recommended-module`, βœ… `recommended-script`.
44

55
<!-- end auto-generated rule header -->
66

β€Ždocs/rules/no-extraneous-require.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow `require()` expressions which import extraneous modules (`n/no-extraneous-require`)
22

3-
πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/eslint-community/eslint-plugin-n#-configs).
3+
πŸ’Ό This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-n#-configs): 🟒 `flat/recommended-module`, βœ… `flat/recommended-script`, β˜‘οΈ `recommended`, 🟒 `recommended-module`, βœ… `recommended-script`.
44

55
<!-- end auto-generated rule header -->
66

β€Ždocs/rules/no-missing-import.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow `import` declarations which import non-existence modules (`n/no-missing-import`)
22

3-
πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/eslint-community/eslint-plugin-n#-configs).
3+
πŸ’Ό This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-n#-configs): 🟒 `flat/recommended-module`, βœ… `flat/recommended-script`, β˜‘οΈ `recommended`, 🟒 `recommended-module`, βœ… `recommended-script`.
44

55
<!-- end auto-generated rule header -->
66

0 commit comments

Comments
Β (0)