@tpluscode/eslint-config 0.4.3 → 0.4.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - ffd1199: Add rules to automatically remove unused imports
8
+
9
+ ## 0.4.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 3edea08: allow dev deps in \*.test.js
14
+
3
15
  ## 0.4.3
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -10,10 +10,10 @@ Newer NPM installs peer dependencies automatically
10
10
  npm i --save-dev @tpluscode/eslint-config
11
11
  ```
12
12
 
13
- With yarn v1 install with:
13
+ For yarn v1 use `install-peerdeps` (`--extra-args` needed for monorepos):
14
14
 
15
15
  ```
16
- npx install-peerdeps -Yd @tpluscode/eslint-config
16
+ npx install-peerdeps -Yd @tpluscode/eslint-config (--extra-args "-W")
17
17
  ```
18
18
 
19
19
  If you write code in TypeScript, add:
package/index.js CHANGED
@@ -24,7 +24,8 @@ module.exports = {
24
24
  'no-dupe-class-members': 'off',
25
25
  '@typescript-eslint/no-dupe-class-members': ['error'],
26
26
  'no-redeclare': 'off',
27
- '@typescript-eslint/no-redeclare': 'warn'
27
+ '@typescript-eslint/no-redeclare': 'warn',
28
+ '@typescript-eslint/no-unused-vars': 'off'
28
29
  },
29
30
  settings: {
30
31
  'import/parsers': {
package/js.js CHANGED
@@ -7,7 +7,8 @@ module.exports = {
7
7
  ],
8
8
  plugins: [
9
9
  'import',
10
- 'require-extensions'
10
+ 'require-extensions',
11
+ 'unused-imports'
11
12
  ],
12
13
  rules: {
13
14
  indent: ['error', 2],
@@ -32,6 +33,8 @@ module.exports = {
32
33
  '**/test/**/*.ts',
33
34
  '*.test.ts',
34
35
  '*.spec.ts',
36
+ '*.test.js',
37
+ '*.spec.js',
35
38
  '**/test/**/*.js',
36
39
  '*.test.js',
37
40
  '*.spec.js',
@@ -41,6 +44,12 @@ module.exports = {
41
44
  ],
42
45
  optionalDependencies: false
43
46
  }
47
+ ],
48
+ 'no-unused-vars': 'off',
49
+ 'unused-imports/no-unused-imports': 'error',
50
+ 'unused-imports/no-unused-vars': [
51
+ 'warn',
52
+ { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }
44
53
  ]
45
54
  },
46
55
  settings: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpluscode/eslint-config",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,10 +12,11 @@
12
12
  "eslint": ">=6",
13
13
  "eslint-config-standard": ">=11",
14
14
  "eslint-plugin-import": ">=2",
15
+ "eslint-plugin-n": ">=15",
15
16
  "eslint-plugin-node": ">=11",
16
17
  "eslint-plugin-promise": ">=6",
17
- "eslint-plugin-n": ">=15",
18
18
  "eslint-plugin-require-extensions": ">=0.1.3",
19
+ "eslint-plugin-unused-imports": "^3.0.0",
19
20
  "standard": ">=11"
20
21
  },
21
22
  "optionalDependencies": {
@@ -30,9 +31,10 @@
30
31
  "eslint-plugin-import": "^2.22.1",
31
32
  "eslint-plugin-node": "^11.1.0",
32
33
  "eslint-plugin-promise": "^6.1.1",
33
- "standard": "^16.0.3",
34
+ "eslint-plugin-unused-imports": "^3.0.0",
35
+ "husky": "^6.0.0",
34
36
  "lint-staged": "^10.5.4",
35
- "husky": "^6.0.0"
37
+ "standard": "^16.0.3"
36
38
  },
37
39
  "repository": {
38
40
  "type": "git",