@paratco/eslint-config 0.4.0 → 0.4.2
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 +19 -1
- package/package.json +1 -1
- package/prettier/README.md +13 -1
- package/prettier/package.json +1 -1
- package/src/lints/typescript/index.js +8 -10
package/README.md
CHANGED
|
@@ -19,11 +19,29 @@ yarn add -D @paratco/eslint-config eslint prettier typescript-eslint
|
|
|
19
19
|
|
|
20
20
|
### Usage (Flat config):
|
|
21
21
|
|
|
22
|
+
Node.JS:
|
|
23
|
+
```javascript
|
|
24
|
+
import paratcoEslintConfig from "@paratco/eslint-config";
|
|
25
|
+
|
|
26
|
+
export default [
|
|
27
|
+
...paratcoEslintConfig.node,
|
|
28
|
+
];
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
React:
|
|
22
32
|
```javascript
|
|
23
33
|
import paratcoEslintConfig from "@paratco/eslint-config";
|
|
24
34
|
|
|
25
35
|
export default [
|
|
26
|
-
...paratcoEslintConfig.base,
|
|
27
36
|
...paratcoEslintConfig.react,
|
|
28
37
|
];
|
|
29
38
|
```
|
|
39
|
+
|
|
40
|
+
Base (JS + TS rules):
|
|
41
|
+
```javascript
|
|
42
|
+
import paratcoEslintConfig from "@paratco/eslint-config";
|
|
43
|
+
|
|
44
|
+
export default [
|
|
45
|
+
...paratcoEslintConfig.base,
|
|
46
|
+
];
|
|
47
|
+
```
|
package/package.json
CHANGED
package/prettier/README.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Paratco Prettier configs
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Installation
|
|
6
|
+
|
|
7
|
+
NPM:
|
|
8
|
+
```bash
|
|
9
|
+
npm install --save-dev @paratco/prettier-config prettier
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Yarn:
|
|
13
|
+
```bash
|
|
14
|
+
yarn add -D @paratco/prettier-config prettier
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Usage:
|
|
6
18
|
|
|
7
19
|
In your `.prettierrc.json` file:
|
|
8
20
|
```json
|
package/prettier/package.json
CHANGED
|
@@ -238,14 +238,12 @@ export default {
|
|
|
238
238
|
|
|
239
239
|
// Enforce template literal expressions to be of string type.
|
|
240
240
|
// https://typescript-eslint.io/rules/restrict-template-expressions
|
|
241
|
-
|
|
242
|
-
"
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
]
|
|
250
|
-
}
|
|
241
|
+
"@typescript-eslint/restrict-template-expressions": [
|
|
242
|
+
"error",
|
|
243
|
+
{
|
|
244
|
+
allowBoolean: true,
|
|
245
|
+
allowNumber: true,
|
|
246
|
+
allowRegExp: true
|
|
247
|
+
}
|
|
248
|
+
]
|
|
251
249
|
};
|