@lzear/eslint-config 2.0.0 → 3.0.0
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/dist/configs/a11y/index.cjs +54 -0
- package/dist/configs/a11y/index.mjs +54 -0
- package/dist/configs/core/index.cjs +88 -0
- package/dist/configs/core/index.mjs +88 -0
- package/dist/configs/node/index.cjs +49 -0
- package/dist/configs/node/index.mjs +31 -0
- package/dist/configs/package-json/index.cjs +33 -0
- package/dist/configs/package-json/index.mjs +16 -0
- package/dist/configs/perfectionist/index.cjs +73 -0
- package/dist/configs/perfectionist/index.mjs +55 -0
- package/dist/configs/react/index.cjs +73 -0
- package/dist/configs/react/index.mjs +55 -0
- package/dist/configs/src/files.cjs +24 -0
- package/dist/configs/src/files.mjs +24 -0
- package/dist/configs/typescript/index.cjs +53 -0
- package/dist/configs/typescript/index.mjs +35 -0
- package/dist/configs/vitest/index.cjs +65 -0
- package/dist/configs/vitest/index.mjs +47 -0
- package/dist/index.cjs +59 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +56 -67
- package/dist/utils.cjs +21 -0
- package/dist/utils.mjs +21 -0
- package/license.md +20 -0
- package/package.json +41 -44
- package/readme.md +31 -23
- package/dist/index.js +0 -1
package/readme.md
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ESLint Config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://npmjs.com/package/@lzear/eslint-configt)
|
|
4
|
+
[](https://github.com/azat-io/eslint-config/blob/main/license.md)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
My preferred ESLint configuration. Forked from [azat-io/eslint-config](https://github.com/azat-io/eslint-config), with some modifications including:
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- Use recommended presets from the plugins instead of managing the rules manually.
|
|
9
|
+
- Changing rules to my personal preferences.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
list of all rules.
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
11
|
+
## Usage
|
|
13
12
|
|
|
14
13
|
1. Install package:
|
|
15
14
|
|
|
16
|
-
```sh
|
|
17
|
-
yarn add --
|
|
18
|
-
```
|
|
15
|
+
```sh
|
|
16
|
+
yarn add --D eslint @lzear/eslint-config
|
|
17
|
+
```
|
|
19
18
|
|
|
20
19
|
2. Create ESLint configuration file `eslint.config.js`:
|
|
21
20
|
|
|
22
|
-
```js
|
|
23
|
-
import eslintConfig from '@lzear/eslint-config'
|
|
21
|
+
```js
|
|
22
|
+
import eslintConfig from '@lzear/eslint-config'
|
|
23
|
+
|
|
24
|
+
export default eslintConfig({
|
|
25
|
+
perfectionist: true,
|
|
26
|
+
typescript: true,
|
|
27
|
+
react: true,
|
|
28
|
+
node: true,
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. Add script for `package.json`:
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test:js": "eslint \"**/*.{js,ts,jsx,tsx,json}\""
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
27
41
|
|
|
28
|
-
|
|
42
|
+
## License
|
|
29
43
|
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
"scripts": {
|
|
33
|
-
"lint": "eslint .",
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
```
|
|
44
|
+
MIT © [Azat S.](https://azat.io)
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("eslint-plugin-prefer-arrow"),u=require("eslint-plugin-node-import"),r=require("eslint-plugin-import"),o=require("eslint-plugin-prettier"),n=require("eslint-plugin-promise"),s=require("eslint-plugin-unicorn"),i=require("eslint-plugin-sonarjs"),t=require("eslint-plugin-n"),e=require("globals"),l=require("@eslint/js");const d=[{ignores:["**/node_modules/**","**/dist/**",".git/**"]},l.configs.recommended,{languageOptions:{ecmaVersion:2023,sourceType:"module",globals:{...e.browser,...e.es2021,...e.node}},plugins:{"prefer-arrow":c,"node-import":u,import:r,promise:n,sonarjs:i,unicorn:s,n:t},rules:{...r.configs.recommended.rules,...t.configs.recommended.rules,"node-import/prefer-node-protocol":2,"prefer-arrow/prefer-arrow-functions":[2,{disallowPrototype:!0,singleReturnOnly:!1,classPropertiesAllowed:!1}],...n.configs.recommended.rules,...i.configs.recommended.rules,...s.configs.recommended.rules}},{rules:{"n/no-missing-import":0,"prefer-const":2,"unicorn/no-abusive-eslint-disable":0,"unicorn/no-null":0,"unicorn/prevent-abbreviations":[0,{checkProperties:!0}]}},{plugins:{prettier:o},rules:o.configs.recommended.rules}],m=d;module.exports=m;
|