@enke.dev/lint 0.8.1 → 0.8.3
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/README.md +3 -1
- package/eslint.config.js +7 -1
- package/package.json +17 -13
- package/stylelint.config.d.ts +13 -0
package/README.md
CHANGED
|
@@ -71,7 +71,9 @@ For now, no TypeScript support is included.
|
|
|
71
71
|
Create a `stylelint.config.js` file in the root of your project and add the following content:
|
|
72
72
|
|
|
73
73
|
```js
|
|
74
|
+
// @ts-check
|
|
75
|
+
|
|
74
76
|
import { defineConfig } from '@enke.dev/lint/stylelint.config.js';
|
|
75
77
|
|
|
76
|
-
export default defineConfig('
|
|
78
|
+
export default defineConfig({ cssCustomPropertyPrefix: 'your-prefix' });
|
|
77
79
|
```
|
package/eslint.config.js
CHANGED
|
@@ -12,7 +12,7 @@ import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
|
|
|
12
12
|
import { configs as eslintPluginWebComponentsConfigs } from 'eslint-plugin-wc';
|
|
13
13
|
import eslintTs from 'typescript-eslint';
|
|
14
14
|
export default eslintTs.config(eslintJs.configs.recommended, ...eslintTs.configs.strict, ...eslintTs.configs.stylistic, eslintPluginPrettierRecommended, eslintPluginImport.flatConfigs.recommended, eslintPluginPackageJson.configs.recommended, eslintPluginLitConfigs['flat/recommended'], eslintPluginWebComponentsConfigs['flat/recommended'], {
|
|
15
|
-
ignores: ['node_modules/', 'dist/'
|
|
15
|
+
ignores: ['node_modules/', 'dist/'],
|
|
16
16
|
}, {
|
|
17
17
|
plugins: {
|
|
18
18
|
'simple-import-sort': eslintPluginSimpleImportSort,
|
|
@@ -20,6 +20,12 @@ export default eslintTs.config(eslintJs.configs.recommended, ...eslintTs.configs
|
|
|
20
20
|
'import-extensions': fixupPluginRules(eslintPluginImportExtension),
|
|
21
21
|
},
|
|
22
22
|
}, {
|
|
23
|
+
languageOptions: {
|
|
24
|
+
parserOptions: {
|
|
25
|
+
project: true,
|
|
26
|
+
tsconfigRootDir: __dirname,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
23
29
|
settings: {
|
|
24
30
|
'import/resolver': {
|
|
25
31
|
typescript: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enke.dev/lint",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Meta package to provide linting for web projects",
|
|
5
5
|
"homepage": "https://github.com/enke-dev/lint",
|
|
6
6
|
"repository": {
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
"url": "git+https://github.com/enke-dev/lint.git"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"eslint.config.js",
|
|
12
11
|
"eslint.config.d.ts",
|
|
12
|
+
"eslint.config.js",
|
|
13
13
|
"eslint-plugins.d.ts",
|
|
14
|
+
"stylelint.config.d.ts",
|
|
14
15
|
"stylelint.config.js",
|
|
15
16
|
"README.md"
|
|
16
17
|
],
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"main": "eslint.config.js",
|
|
19
20
|
"types": "eslint.config.d.ts",
|
|
20
21
|
"scripts": {
|
|
21
|
-
"lint": "eslint -c eslint.config.ts
|
|
22
|
+
"lint": "eslint -c eslint.config.ts ./*.config.ts",
|
|
22
23
|
"build": "tsc"
|
|
23
24
|
},
|
|
24
25
|
"author": {
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"access": "public"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
|
-
"eslint": "^9.
|
|
34
|
+
"eslint": "^9.34.0",
|
|
34
35
|
"prettier": "^3.6.2"
|
|
35
36
|
},
|
|
36
37
|
"optionalDependencies": {
|
|
@@ -40,23 +41,23 @@
|
|
|
40
41
|
"stylelint-order": "^7.0.0"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@eslint/compat": "^1.3.
|
|
44
|
-
"@eslint/js": "^9.
|
|
44
|
+
"@eslint/compat": "^1.3.2",
|
|
45
|
+
"@eslint/js": "^9.34.0",
|
|
45
46
|
"@eslint/json": "^0.13.2",
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
47
|
-
"@typescript-eslint/parser": "^8.
|
|
48
|
-
"eslint-config-prettier": "^10.1.
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
48
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
49
|
+
"eslint-config-prettier": "^10.1.8",
|
|
49
50
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
50
51
|
"eslint-plugin-import": "^2.32.0",
|
|
51
52
|
"eslint-plugin-import-extensions": "^0.1.5",
|
|
52
53
|
"eslint-plugin-lit": "^2.1.1",
|
|
53
54
|
"eslint-plugin-package-json": "^0.56.1",
|
|
54
|
-
"eslint-plugin-prettier": "^5.5.
|
|
55
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
55
56
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
56
|
-
"eslint-plugin-unused-imports": "^4.
|
|
57
|
+
"eslint-plugin-unused-imports": "^4.2.0",
|
|
57
58
|
"eslint-plugin-wc": "^3.0.1",
|
|
58
|
-
"typescript": "^5.
|
|
59
|
-
"typescript-eslint": "^8.
|
|
59
|
+
"typescript": "^5.9.2",
|
|
60
|
+
"typescript-eslint": "^8.42.0"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@types/node": "24.3.0",
|
|
@@ -64,6 +65,9 @@
|
|
|
64
65
|
"typescript": "5.9.2"
|
|
65
66
|
},
|
|
66
67
|
"overrides": {
|
|
68
|
+
"eslint-plugin-unused-imports": {
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin"
|
|
70
|
+
},
|
|
67
71
|
"typescript-eslint": {
|
|
68
72
|
"typescript": "$typescript"
|
|
69
73
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Config } from 'stylelint';
|
|
2
|
+
/**
|
|
3
|
+
* Stylelint configuration options
|
|
4
|
+
*/
|
|
5
|
+
export interface Options {
|
|
6
|
+
cssCustomPropertyPrefix: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Prepares a Stylelint configuration
|
|
10
|
+
* @param options to configure options
|
|
11
|
+
* @returns an options object to be used for Stylelint
|
|
12
|
+
*/
|
|
13
|
+
export declare const defineConfig: ({ cssCustomPropertyPrefix }: Options) => Config;
|