eslint-config-airbnb-extended 1.0.1 → 1.0.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.
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
var _a, _b;
|
|
5
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const eslint_plugin_n_1 = __importDefault(require("eslint-plugin-n"));
|
|
8
8
|
const config_1 = __importDefault(require("../../configs/node/config"));
|
|
9
9
|
const nodeNoUnsupportedFeatures_1 = __importDefault(require("../../rules/node/nodeNoUnsupportedFeatures"));
|
|
10
10
|
const utils_1 = require("../../utils");
|
|
11
11
|
const flatNodeConfig = eslint_plugin_n_1.default.configs['flat/recommended'];
|
|
12
|
+
const flatModuleConfig = eslint_plugin_n_1.default.configs['flat/recommended-module'];
|
|
13
|
+
const flatScriptConfig = eslint_plugin_n_1.default.configs['flat/recommended-script'];
|
|
12
14
|
const nodeRecommendedConfig = [
|
|
13
15
|
...Object.values(config_1.default),
|
|
14
16
|
Object.assign({ name: 'airbnb/config/node-configurations', files: utils_1.allFiles }, (flatNodeConfig
|
|
@@ -19,5 +21,21 @@ const nodeRecommendedConfig = [
|
|
|
19
21
|
},
|
|
20
22
|
}
|
|
21
23
|
: null)),
|
|
24
|
+
Object.assign({ name: 'airbnb/config/node-configurations-for-module', files: ['**/*.mjs', '**/*.mts'] }, (flatModuleConfig
|
|
25
|
+
? {
|
|
26
|
+
languageOptions: flatModuleConfig.languageOptions,
|
|
27
|
+
rules: {
|
|
28
|
+
'n/no-unsupported-features/es-syntax': (_d = (_c = flatModuleConfig.rules) === null || _c === void 0 ? void 0 : _c['n/no-unsupported-features/es-syntax']) !== null && _d !== void 0 ? _d : nodeNoUnsupportedFeatures_1.default.rules['n/no-unsupported-features/es-syntax'],
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
: null)),
|
|
32
|
+
Object.assign({ name: 'airbnb/config/node-configurations-for-script', files: ['**/*.cjs', '**/*.cts'] }, (flatScriptConfig
|
|
33
|
+
? {
|
|
34
|
+
languageOptions: flatScriptConfig.languageOptions,
|
|
35
|
+
rules: {
|
|
36
|
+
'n/no-unsupported-features/es-syntax': (_f = (_e = flatScriptConfig.rules) === null || _e === void 0 ? void 0 : _e['n/no-unsupported-features/es-syntax']) !== null && _f !== void 0 ? _f : nodeNoUnsupportedFeatures_1.default.rules['n/no-unsupported-features/es-syntax'],
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
: null)),
|
|
22
40
|
];
|
|
23
41
|
exports.default = nodeRecommendedConfig;
|
|
@@ -10,7 +10,7 @@ const nodeNoUnsupportedFeaturesRules = {
|
|
|
10
10
|
'n/no-unsupported-features/es-builtins': 'error',
|
|
11
11
|
// Disallow unsupported ECMAScript syntax on the specified version
|
|
12
12
|
// https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/es-syntax.md
|
|
13
|
-
'n/no-unsupported-features/es-syntax': '
|
|
13
|
+
'n/no-unsupported-features/es-syntax': 'off',
|
|
14
14
|
// Disallow unsupported Node.js built-in APIs on the specified version
|
|
15
15
|
// https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/node-builtins.md
|
|
16
16
|
'n/no-unsupported-features/node-builtins': 'error',
|