@simplysm/lint 13.0.29 → 13.0.30
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 +25 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,25 +13,7 @@ npm install @simplysm/lint
|
|
|
13
13
|
pnpm add @simplysm/lint
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
This plugin depends on the following packages:
|
|
19
|
-
|
|
20
|
-
| Package | Description |
|
|
21
|
-
|---------|-------------|
|
|
22
|
-
| `eslint` | ESLint core |
|
|
23
|
-
| `typescript` | TypeScript compiler |
|
|
24
|
-
| `typescript-eslint` | TypeScript ESLint parser and plugin |
|
|
25
|
-
| `eslint-plugin-import` | Rules for import/export |
|
|
26
|
-
| `eslint-plugin-unused-imports` | Auto-remove unused imports |
|
|
27
|
-
| `eslint-plugin-solid` | SolidJS-specific rules |
|
|
28
|
-
| `eslint-plugin-tailwindcss` | Tailwind CSS-specific rules |
|
|
29
|
-
| `globals` | Global variable definitions |
|
|
30
|
-
| `stylelint` | Stylelint core |
|
|
31
|
-
| `stylelint-config-standard` | Standard Stylelint rules |
|
|
32
|
-
| `stylelint-config-tailwindcss` | Tailwind CSS-specific Stylelint rules |
|
|
33
|
-
| `stylelint-no-unsupported-browser-features` | Browser compatibility checker |
|
|
34
|
-
| `stylelint-no-unresolved-module` | Import/url() file existence checker |
|
|
16
|
+
All required linting libraries (eslint, typescript-eslint, stylelint, etc.) are included as dependencies and do not need to be installed separately.
|
|
35
17
|
|
|
36
18
|
## Configuration
|
|
37
19
|
|
|
@@ -39,20 +21,37 @@ This plugin depends on the following packages:
|
|
|
39
21
|
|
|
40
22
|
#### Using recommended config (recommended)
|
|
41
23
|
|
|
42
|
-
The `recommended`
|
|
24
|
+
The `eslint-recommended` entry point exports a comprehensive flat config array that includes custom rules, TypeScript rules, SolidJS rules, and Tailwind CSS rules. This is sufficient for most cases.
|
|
43
25
|
|
|
44
26
|
```javascript
|
|
45
|
-
import
|
|
27
|
+
import simplysmConfigs from "@simplysm/lint/eslint-recommended";
|
|
46
28
|
|
|
47
29
|
export default [
|
|
48
|
-
|
|
49
|
-
|
|
30
|
+
...simplysmConfigs,
|
|
31
|
+
];
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
To extend with additional settings (e.g., specifying a Tailwind config path):
|
|
35
|
+
|
|
36
|
+
```javascript
|
|
37
|
+
import simplysmConfigs from "@simplysm/lint/eslint-recommended";
|
|
38
|
+
|
|
39
|
+
export default [
|
|
40
|
+
...simplysmConfigs,
|
|
41
|
+
{
|
|
42
|
+
files: ["**/*.{ts,tsx}"],
|
|
43
|
+
settings: {
|
|
44
|
+
tailwindcss: {
|
|
45
|
+
config: "tailwind.config.ts",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
50
49
|
];
|
|
51
50
|
```
|
|
52
51
|
|
|
53
|
-
#### Using only specific rules
|
|
52
|
+
#### Using only the ESLint plugin with specific rules
|
|
54
53
|
|
|
55
|
-
To selectively apply only certain custom rules
|
|
54
|
+
To selectively apply only certain custom rules, import the plugin from `eslint-plugin`:
|
|
56
55
|
|
|
57
56
|
```javascript
|
|
58
57
|
import simplysm from "@simplysm/lint/eslint-plugin";
|
|
@@ -316,7 +315,7 @@ throw new CC.NotImplementedError(); // Warning
|
|
|
316
315
|
|
|
317
316
|
## recommended Config Details
|
|
318
317
|
|
|
319
|
-
Full list of rules included in the `recommended` config.
|
|
318
|
+
Full list of rules included in the `eslint-recommended` config.
|
|
320
319
|
|
|
321
320
|
### Global Ignore Patterns
|
|
322
321
|
|