@dr.pogodin/eslint-configs 0.2.4 → 0.2.5
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/config/javascript.js +3 -3
- package/config/typescript.js +10 -1
- package/package.json +2 -2
package/config/javascript.js
CHANGED
|
@@ -11,7 +11,7 @@ import babelPlugin from '@babel/eslint-plugin';
|
|
|
11
11
|
import js from '@eslint/js';
|
|
12
12
|
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
export function newJsConfig({ noPerf } = {}) {
|
|
15
15
|
const extentions = [
|
|
16
16
|
'js/recommended',
|
|
17
17
|
'@stylistic/recommended',
|
|
@@ -335,6 +335,6 @@ function newConfig({ noPerf } = {}) {
|
|
|
335
335
|
}]);
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
export const javascriptNoPerf =
|
|
338
|
+
export const javascriptNoPerf = newJsConfig({ noPerf: true });
|
|
339
339
|
|
|
340
|
-
export default
|
|
340
|
+
export default newJsConfig();
|
package/config/typescript.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { defineConfig } from 'eslint/config';
|
|
2
2
|
import tsEsLint from 'typescript-eslint';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { javascriptNoPerf, newJsConfig } from './javascript.js';
|
|
5
5
|
|
|
6
6
|
function newConfig({ noPerf } = {}) {
|
|
7
|
+
const jsConfig = newJsConfig();
|
|
8
|
+
|
|
9
|
+
// TODO: It is not the best way to modify this rule's settings,
|
|
10
|
+
// it will be better to expose this as an option of newJsConfig()
|
|
11
|
+
// function.
|
|
12
|
+
jsConfig[0].rules['perfectionist/sort-imports'][1].tsconfig = {
|
|
13
|
+
rootDir: '.',
|
|
14
|
+
};
|
|
15
|
+
|
|
7
16
|
let extentions = [
|
|
8
17
|
jsConfig,
|
|
9
18
|
tsEsLint.configs.recommendedTypeChecked,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dr.pogodin/eslint-configs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "ESLint configurations for TypeScript and/or React projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./config/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/eslint-parser": "^7.28.6",
|
|
33
33
|
"@babel/eslint-plugin": "^7.27.1",
|
|
34
|
-
"@babel/preset-env": "^7.
|
|
34
|
+
"@babel/preset-env": "^7.29.0",
|
|
35
35
|
"@babel/preset-react": "^7.28.5",
|
|
36
36
|
"@babel/preset-typescript": "^7.28.5",
|
|
37
37
|
"@eslint/js": "^9.39.2",
|