@ntnyq/eslint-config 0.4.0 → 1.0.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.
Files changed (4) hide show
  1. package/LICENSE +1 -1
  2. package/lib/index.js +2 -123
  3. package/package.json +22 -21
  4. package/README.md +0 -38
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020-present ntnyq
3
+ Copyright (c) 2020-present ntnyq (https://github.com/ntnyq)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/lib/index.js CHANGED
@@ -1,130 +1,9 @@
1
1
  /**
2
- * Based on Standard JavaScript Style
3
- *
4
- * @see https://github.com/standard/eslint-config-standard
2
+ * @file ESLint config
5
3
  */
6
4
 
7
5
  module.exports = {
8
6
  extends: [
9
- // Standard JavaScript style
10
- 'standard',
7
+ `@ntnyq/eslint-config-vue`,
11
8
  ],
12
-
13
- rules: {
14
- /**
15
- * Requires the use of single quotes wherever possible
16
- *
17
- * @see https://eslint.org/docs/rules/quotes
18
- */
19
- quotes: [
20
- 'error',
21
- 'single',
22
- {
23
- allowTemplateLiterals: true,
24
- },
25
- ],
26
-
27
- /**
28
- * Requires the use of `const` or `let` instead of `var`
29
- *
30
- * @see https://eslint.org/docs/rules/no-var
31
- */
32
- 'no-var': ['error'],
33
-
34
- /**
35
- * Requires the use of trailing commas in object and array literals
36
- *
37
- * @see https://eslint.org/docs/rules/comma-dangle
38
- */
39
- 'comma-dangle': ['error', 'always-multiline'],
40
-
41
- /**
42
- * Enforce a maximum file length
43
- *
44
- * @see https://eslint.org/docs/rules/max-lines
45
- */
46
- 'max-lines': [
47
- 'error',
48
- {
49
- max: 1000,
50
- skipComments: true,
51
- skipBlankLines: true,
52
- },
53
- ],
54
-
55
- /**
56
- * Limit Cyclomatic Complexity
57
- *
58
- * @see https://eslint.org/docs/rules/complexity
59
- */
60
- complexity: ['error', { max: 30 }],
61
-
62
- /**
63
- * Enforce a maximum number of parameters in function definitions
64
- *
65
- * @see https://eslint.org/docs/rules/max-params
66
- */
67
- 'max-params': ['error', { max: 5 }],
68
-
69
- /**
70
- * Enforce a maximum line length
71
- *
72
- * @see https://eslint.org/docs/rules/max-len
73
- */
74
- 'max-len': [
75
- 'error',
76
- {
77
- code: 200,
78
- tabWidth: 2,
79
- comments: 200,
80
- ignoreUrls: true,
81
- ignoreStrings: true,
82
- ignoreRegExpLiterals: true,
83
- ignoreTemplateLiterals: true,
84
- ignoreTrailingComments: true,
85
- },
86
- ],
87
-
88
- /**
89
- * Enforce a maximum depth that callbacks can be nested
90
- *
91
- * @see https://eslint.org/docs/rules/max-nested-callbacks
92
- */
93
- 'max-nested-callbacks': ['error', { max: 10 }],
94
-
95
- /**
96
- * Enforce a maximum function length
97
- *
98
- * @see https://eslint.org/docs/rules/max-lines-per-function
99
- */
100
- 'max-lines-per-function': [
101
- 'error',
102
- {
103
- max: 100,
104
- skipBlankLines: true,
105
- skipComments: true,
106
- },
107
- ],
108
-
109
- /**
110
- * Enforce a maximum number of statements allowed per line
111
- *
112
- * @see https://eslint.org/docs/rules/max-statements-per-line
113
- */
114
- 'max-statements-per-line': ['error', { max: 2 }],
115
-
116
- /**
117
- * Enforce a maximum depth that blocks can be nested
118
- *
119
- * @see https://eslint.org/docs/rules/max-depth
120
- */
121
- 'max-depth': ['error', { max: 5 }],
122
-
123
- /**
124
- * Enforces having one empty lines after the last top-level import statement or require call
125
- *
126
- * @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
127
- */
128
- 'import/newline-after-import': ['error'],
129
- },
130
9
  }
package/package.json CHANGED
@@ -1,20 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
- "version": "0.4.0",
4
- "description": "ntnyq eslint config",
5
- "keywords": [
6
- "eslint-config",
7
- "ntnyq"
8
- ],
9
- "scripts": {
10
- "test": "jest"
11
- },
12
- "homepage": "https://github.com/ntnyq/configs#readme",
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/ntnyq/configs.git",
16
- "directory": "packages/eslint/config"
17
- },
3
+ "version": "1.0.2",
4
+ "description": "",
5
+ "keywords": [],
18
6
  "license": "MIT",
19
7
  "author": {
20
8
  "name": "ntnyq",
@@ -25,13 +13,26 @@
25
13
  "lib"
26
14
  ],
27
15
  "dependencies": {
28
- "eslint-config-standard": "^16.0.3",
29
- "eslint-plugin-import": "^2.25.4",
30
- "eslint-plugin-node": "^11.1.0",
31
- "eslint-plugin-promise": "^6.0.0"
16
+ "@ntnyq/eslint-config-vue": "1.0.2",
17
+ "@typescript-eslint/eslint-plugin": "^5.25.0",
18
+ "@typescript-eslint/parser": "^5.25.0",
19
+ "eslint-plugin-eslint-comments": "^3.2.0",
20
+ "eslint-plugin-html": "^6.2.0",
21
+ "eslint-plugin-import": "^2.26.0",
22
+ "eslint-plugin-jsonc": "^2.2.1",
23
+ "eslint-plugin-markdown": "^2.2.1",
24
+ "eslint-plugin-n": "^15.2.0",
25
+ "eslint-plugin-promise": "^6.0.0",
26
+ "eslint-plugin-unicorn": "^42.0.0",
27
+ "eslint-plugin-yml": "^1.0.0",
28
+ "jsonc-eslint-parser": "^2.1.0",
29
+ "yaml-eslint-parser": "^1.0.1"
32
30
  },
33
31
  "publishConfig": {
34
32
  "access": "public"
35
33
  },
36
- "gitHead": "9a1352e301fdf0faa9714e3a5fc99eb8db19ec1b"
37
- }
34
+ "devDependencies": {
35
+ "eslint": "^8.15.0",
36
+ "typescript": "^4.0.0"
37
+ }
38
+ }
package/README.md DELETED
@@ -1,38 +0,0 @@
1
- # EsLint config
2
-
3
- ## Usage
4
-
5
- ### Install
6
-
7
- ```bash
8
- $ npm i @ntnyq/eslint-config -D
9
- # OR
10
- $ yarn add @ntnyq/eslint-config -D
11
- ```
12
-
13
- ### Extend this config
14
-
15
- in `.eslintrc.js`
16
-
17
- ```js
18
- module.exports = {
19
- root: true,
20
-
21
- extends: ['@ntnyq'],
22
-
23
- rules: {
24
- // Override rules
25
- },
26
- }
27
- ```
28
-
29
- in `package.json`
30
-
31
- ```json
32
- {
33
- "eslintConfig": {
34
- "root": true,
35
- "extends": "@ntnyq"
36
- }
37
- }
38
- ```