@lqbach/eslint-config 0.3.3 → 0.3.4
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/CHANGELOG.md +7 -0
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +11 -0
- package/package.json +3 -2
- package/src/index.ts +11 -0
- package/tsconfig.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.4](https://github.com/lqbach/eslint-prettier-config/compare/eslint-config-v0.3.3...eslint-config-v0.3.4) (2023-11-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes 🐛
|
|
7
|
+
|
|
8
|
+
* add types in declaration file and tweaked react config ([1bc30e4](https://github.com/lqbach/eslint-prettier-config/commit/1bc30e4f2735546a6eab2f37651a70b469e9f658))
|
|
9
|
+
|
|
3
10
|
## [0.3.3](https://github.com/lqbach/eslint-prettier-config/compare/eslint-config-v0.3.2...eslint-config-v0.3.3) (2023-11-22)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -423,6 +423,17 @@ function config(params = {}) {
|
|
|
423
423
|
} : {};
|
|
424
424
|
const reactConfig = params.react ?? false ? {
|
|
425
425
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
426
|
+
languageOptions: {
|
|
427
|
+
globals: {
|
|
428
|
+
...import_globals.default.serviceworker,
|
|
429
|
+
...import_globals.default.browser
|
|
430
|
+
},
|
|
431
|
+
parserOptions: {
|
|
432
|
+
ecmaFeatures: {
|
|
433
|
+
jsx: true
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
426
437
|
plugins: {
|
|
427
438
|
react: import_eslint_plugin_react.default
|
|
428
439
|
},
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface ConfigParams {
|
|
2
|
+
json?: boolean;
|
|
3
|
+
markdown?: boolean;
|
|
4
|
+
perfectionist?: boolean;
|
|
5
|
+
react?: boolean;
|
|
6
|
+
typescript?: boolean;
|
|
7
|
+
vue?: boolean;
|
|
8
|
+
yaml?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface LanguageOptions {
|
|
11
|
+
ecmaVersion?: string;
|
|
12
|
+
globals?: object;
|
|
13
|
+
parser?: object;
|
|
14
|
+
parserOptions?: object;
|
|
15
|
+
sourceType?: string;
|
|
16
|
+
}
|
|
17
|
+
interface LinterOptions {
|
|
18
|
+
noInlineConfig?: boolean;
|
|
19
|
+
reportUnusedDisableDirectives?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface ConfigObject {
|
|
22
|
+
files?: Array<string>;
|
|
23
|
+
ignores?: Array<string>;
|
|
24
|
+
languageOptions?: LanguageOptions;
|
|
25
|
+
linterOptions?: LinterOptions;
|
|
26
|
+
plugins?: object;
|
|
27
|
+
processor?: object;
|
|
28
|
+
rules?: object;
|
|
29
|
+
settings?: object;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare function config(params?: ConfigParams): Array<ConfigObject>;
|
|
33
|
+
|
|
34
|
+
export { config as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface ConfigParams {
|
|
2
|
+
json?: boolean;
|
|
3
|
+
markdown?: boolean;
|
|
4
|
+
perfectionist?: boolean;
|
|
5
|
+
react?: boolean;
|
|
6
|
+
typescript?: boolean;
|
|
7
|
+
vue?: boolean;
|
|
8
|
+
yaml?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface LanguageOptions {
|
|
11
|
+
ecmaVersion?: string;
|
|
12
|
+
globals?: object;
|
|
13
|
+
parser?: object;
|
|
14
|
+
parserOptions?: object;
|
|
15
|
+
sourceType?: string;
|
|
16
|
+
}
|
|
17
|
+
interface LinterOptions {
|
|
18
|
+
noInlineConfig?: boolean;
|
|
19
|
+
reportUnusedDisableDirectives?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface ConfigObject {
|
|
22
|
+
files?: Array<string>;
|
|
23
|
+
ignores?: Array<string>;
|
|
24
|
+
languageOptions?: LanguageOptions;
|
|
25
|
+
linterOptions?: LinterOptions;
|
|
26
|
+
plugins?: object;
|
|
27
|
+
processor?: object;
|
|
28
|
+
rules?: object;
|
|
29
|
+
settings?: object;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare function config(params?: ConfigParams): Array<ConfigObject>;
|
|
33
|
+
|
|
34
|
+
export { config as default };
|
package/dist/index.js
CHANGED
|
@@ -412,6 +412,17 @@ function config(params = {}) {
|
|
|
412
412
|
} : {};
|
|
413
413
|
const reactConfig = params.react ?? false ? {
|
|
414
414
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
415
|
+
languageOptions: {
|
|
416
|
+
globals: {
|
|
417
|
+
...globals.serviceworker,
|
|
418
|
+
...globals.browser
|
|
419
|
+
},
|
|
420
|
+
parserOptions: {
|
|
421
|
+
ecmaFeatures: {
|
|
422
|
+
jsx: true
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
415
426
|
plugins: {
|
|
416
427
|
react: default8
|
|
417
428
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lqbach/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"description": "lqbach's Personal Eslint Config",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "MIT",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"main": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
21
22
|
"@typescript-eslint/parser": "^6.10.0",
|
|
@@ -37,6 +38,6 @@
|
|
|
37
38
|
"eslint": "^8.53.0"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
|
-
"build": "tsup src/index.ts
|
|
41
|
+
"build": "tsup src/index.ts --format esm,cjs --clean --dts"
|
|
41
42
|
}
|
|
42
43
|
}
|
package/src/index.ts
CHANGED
|
@@ -105,6 +105,17 @@ export default function config(params: ConfigParams = {}): Array<ConfigObject> {
|
|
|
105
105
|
params.react ?? false
|
|
106
106
|
? {
|
|
107
107
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
108
|
+
languageOptions: {
|
|
109
|
+
globals: {
|
|
110
|
+
...globals.serviceworker,
|
|
111
|
+
...globals.browser,
|
|
112
|
+
},
|
|
113
|
+
parserOptions: {
|
|
114
|
+
ecmaFeatures: {
|
|
115
|
+
jsx: true,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
108
119
|
plugins: {
|
|
109
120
|
react: pluginReact,
|
|
110
121
|
},
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "es2022",
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "es2022",
|
|
5
5
|
"moduleResolution": "node",
|
|
6
6
|
"declaration": true,
|
|
7
7
|
"strict": true,
|
|
8
|
-
"incremental": true,
|
|
9
8
|
"esModuleInterop": true,
|
|
10
9
|
"skipLibCheck": true,
|
|
11
10
|
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"outDir": "./dist"
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
"outDir": "./dist"
|
|
12
|
+
},
|
|
13
|
+
"include": ["**/*.ts"]
|
|
15
14
|
}
|