eslint-config-isaacscript 4.8.0 → 4.8.1
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/configs/base-import.js +2 -2
- package/configs/base-n.js +16 -0
- package/package.json +1 -1
package/configs/base-import.js
CHANGED
|
@@ -23,7 +23,7 @@ const HELPFUL_WARNINGS = {
|
|
|
23
23
|
* The options are [copied from
|
|
24
24
|
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/import.js).
|
|
25
25
|
*
|
|
26
|
-
* We also add a "scripts" directory entry for "
|
|
26
|
+
* We also add a "scripts" directory entry for "devDependencies".
|
|
27
27
|
*/
|
|
28
28
|
"import/no-extraneous-dependencies": [
|
|
29
29
|
"error",
|
|
@@ -52,7 +52,7 @@ const HELPFUL_WARNINGS = {
|
|
|
52
52
|
"**/karma.conf.js", // karma config
|
|
53
53
|
"**/.eslintrc.js", // eslint config
|
|
54
54
|
|
|
55
|
-
"**/scripts/*.{ts,cts,mts}", //
|
|
55
|
+
"**/scripts/*.{js,cjs,mjs,ts,cts,mts}", // Files inside of a "scripts" directory.
|
|
56
56
|
],
|
|
57
57
|
optionalDependencies: false,
|
|
58
58
|
},
|
package/configs/base-n.js
CHANGED
|
@@ -41,7 +41,13 @@ const POSSIBLE_ERRORS = {
|
|
|
41
41
|
"n/no-process-exit": "off",
|
|
42
42
|
|
|
43
43
|
"n/no-unpublished-bin": "error",
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* An exception is made for files in a "scripts" directory, since those should be allowed to
|
|
47
|
+
* import from "devDependencies".
|
|
48
|
+
*/
|
|
44
49
|
"n/no-unpublished-import": "error",
|
|
50
|
+
|
|
45
51
|
"n/no-unpublished-require": "error",
|
|
46
52
|
|
|
47
53
|
/** Disabled because this rule is deprecated. */
|
|
@@ -137,6 +143,16 @@ const config = {
|
|
|
137
143
|
...POSSIBLE_ERRORS,
|
|
138
144
|
...STYLISTIC_ISSUES,
|
|
139
145
|
},
|
|
146
|
+
|
|
147
|
+
overrides: [
|
|
148
|
+
// Imports in a "scripts" directory can use "devDependencies".
|
|
149
|
+
{
|
|
150
|
+
files: ["**/scripts/*.{js,cjs,mjs,ts,cts,mts}"],
|
|
151
|
+
rules: {
|
|
152
|
+
"n/no-unpublished-import": "off",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
],
|
|
140
156
|
};
|
|
141
157
|
|
|
142
158
|
module.exports = config;
|