@lzear/eslint-config 2.1.0 → 3.0.1

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 CHANGED
@@ -1,36 +1,44 @@
1
- # @lzear/eslint-config
1
+ # ESLint Config
2
2
 
3
- <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/5698350/241426629-f7e3a5bf-50fe-49c1-ad76-98bd3914cd3e.svg" alt="ESLint" align="right" width="150" height="150" />
3
+ [![Version](https://img.shields.io/npm/v/@lzear/eslint-config.svg?color=4a32c3&labelColor=26272b)](https://npmjs.com/package/@lzear/eslint-configt)
4
+ [![GitHub License](https://img.shields.io/badge/license-MIT-232428.svg?color=4a32c3&labelColor=26272b)](https://github.com/azat-io/eslint-config/blob/main/license.md)
4
5
 
5
- ![Version](https://img.shields.io/npm/v/@lzear/eslint-config.svg?color=brightgreen)
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
- Shareable ESLint config for JavaScript projects.
8
+ - Use recommended presets from the plugins instead of managing the rules manually.
9
+ - Changing rules to my personal preferences.
8
10
 
9
- See [docs](https://github.com/lzear/eslint-config/blob/main/base/docs.md) for a
10
- list of all rules.
11
-
12
- ## Installation
11
+ ## Usage
13
12
 
14
13
  1. Install package:
15
14
 
16
- ```sh
17
- yarn add --save-dev eslint @lzear/eslint-config eslint-plugin-import eslint-plugin-n eslint-plugin-node-import eslint-plugin-prefer-arrow eslint-plugin-promise eslint-plugin-sonarjs eslint-plugin-unicorn
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
- export default eslintConfig
26
- ```
34
+ ```json
35
+ {
36
+ "scripts": {
37
+ "test:js": "eslint \"**/*.{js,ts,jsx,tsx,json}\""
38
+ }
39
+ }
40
+ ```
27
41
 
28
- 3. Add script for package.json:
42
+ ## License
29
43
 
30
- ```js
31
- {
32
- "scripts": {
33
- "lint": "eslint .",
34
- }
35
- }
36
- ```
44
+ MIT &copy; [Azat S.](https://azat.io)
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";const n=require("@eslint/js"),r=require("eslint-plugin-n"),i=require("eslint-plugin-node-import"),t=require("eslint-plugin-prefer-arrow"),o=require("eslint-plugin-prettier"),c=require("eslint-plugin-simple-import-sort"),s=require("eslint-plugin-unicorn"),e=require("globals");const l=[{ignores:["**/node_modules/**","**/dist/**",".git/**"]},n.configs.recommended,{languageOptions:{ecmaVersion:2023,sourceType:"module",globals:{...e.browser,...e.es2021,...e.node}},plugins:{"prefer-arrow":t,"node-import":i,unicorn:s,n:r,"simple-import-sort":c},rules:{...r.configs.recommended.rules,"node-import/prefer-node-protocol":2,"prefer-arrow/prefer-arrow-functions":[2,{disallowPrototype:!0,singleReturnOnly:!1,classPropertiesAllowed:!1}],"simple-import-sort/imports":2,"simple-import-sort/exports":2,...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}],u=l;module.exports=u;