@origin-1/eslint-config 1.5.0 → 1.6.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/lib/create-config.js +4 -4
- package/lib/rules.js +1 -1
- package/package.json +3 -3
package/lib/create-config.js
CHANGED
|
@@ -124,7 +124,7 @@ async function createSingleFlatConfig(configData) {
|
|
|
124
124
|
const lang = getLanguage(configData);
|
|
125
125
|
if (lang != null) {
|
|
126
126
|
const languageOptions = { ...config.languageOptions };
|
|
127
|
-
let { ecmaVersion, parser } = languageOptions;
|
|
127
|
+
let { ecmaVersion, parser, parserOptions } = languageOptions;
|
|
128
128
|
let jsVersion;
|
|
129
129
|
let tsVersion;
|
|
130
130
|
switch (lang) {
|
|
@@ -137,10 +137,12 @@ async function createSingleFlatConfig(configData) {
|
|
|
137
137
|
tsVersion = (0, normalize_version_js_1.normalizeTSVersion)(rawTSVersion);
|
|
138
138
|
ecmaVersion ??= 'latest';
|
|
139
139
|
parser ??= await importParser('@typescript-eslint/parser');
|
|
140
|
+
parserOptions = { projectService: true, ...parserOptions };
|
|
140
141
|
break;
|
|
141
142
|
}
|
|
142
143
|
languageOptions.ecmaVersion = ecmaVersion;
|
|
143
144
|
languageOptions.parser = parser;
|
|
145
|
+
languageOptions.parserOptions = parserOptions;
|
|
144
146
|
const linterOptions = { ...config.linterOptions };
|
|
145
147
|
linterOptions.reportUnusedDisableDirectives ??= true;
|
|
146
148
|
const plugins = {};
|
|
@@ -148,9 +150,7 @@ async function createSingleFlatConfig(configData) {
|
|
|
148
150
|
addLanguageRules(lang, jsVersion, tsVersion, rules, rulePrefixes);
|
|
149
151
|
const pluginPromises = rulePrefixes.map(importPlugin);
|
|
150
152
|
const pluginList = await Promise.all(pluginPromises);
|
|
151
|
-
rulePrefixes.forEach((rulePrefix, index) => {
|
|
152
|
-
plugins[rulePrefix] = pluginList[index];
|
|
153
|
-
});
|
|
153
|
+
rulePrefixes.forEach((rulePrefix, index) => { plugins[rulePrefix] = pluginList[index]; });
|
|
154
154
|
config.languageOptions = languageOptions;
|
|
155
155
|
config.linterOptions = linterOptions;
|
|
156
156
|
config.plugins = Object.assign(plugins, config.plugins);
|
package/lib/rules.js
CHANGED
|
@@ -261,7 +261,7 @@ exports.RULES = {
|
|
|
261
261
|
'no-non-null-asserted-optional-chain': ['error'],
|
|
262
262
|
'no-non-null-assertion': 'off',
|
|
263
263
|
'no-require-imports': ['error'],
|
|
264
|
-
'no-unnecessary-type-parameters':
|
|
264
|
+
'no-unnecessary-type-parameters': 'off',
|
|
265
265
|
'no-unsafe-argument': ['error'],
|
|
266
266
|
'no-unsafe-assignment': ['error'],
|
|
267
267
|
'no-unsafe-call': 'off',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origin-1/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "ESLint configuration generator with Origin₁ presets",
|
|
5
5
|
"homepage": "https://github.com/origin-1/eslint-config#readme",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"@eslint-community/eslint-plugin-eslint-comments": ">=4.1",
|
|
18
18
|
"@origin-1/eslint-plugin": ">=0.16",
|
|
19
19
|
"@stylistic/eslint-plugin": "^2.1",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "8.0
|
|
21
|
-
"@typescript-eslint/parser": "8.0
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^8.0",
|
|
21
|
+
"@typescript-eslint/parser": "^8.0",
|
|
22
22
|
"eslint": "^9.3",
|
|
23
23
|
"eslint-plugin-n": "17"
|
|
24
24
|
},
|