@innovixx/eslint-config 1.0.4 → 1.0.6

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.
@@ -125,7 +125,7 @@ module.exports = {
125
125
 
126
126
  // Require modules with a single export to use a default export
127
127
  // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
128
- 'import/prefer-default-export': 'error',
128
+ 'import/prefer-default-export': 'off',
129
129
 
130
130
  // Restrict which files can be imported in a given folder
131
131
  // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
@@ -362,12 +362,7 @@ module.exports = {
362
362
 
363
363
  // disallow dangling underscores in identifiers
364
364
  // https://eslint.org/docs/rules/no-underscore-dangle
365
- 'no-underscore-dangle': ['error', {
366
- allow: [],
367
- allowAfterThis: false,
368
- allowAfterSuper: false,
369
- enforceInMethodNames: true,
370
- }],
365
+ 'no-underscore-dangle': 'off',
371
366
 
372
367
  // disallow the use of Boolean literals in conditional expressions
373
368
  // also, prefer `a || b` over `a ? a : b`
package/configs/index.js CHANGED
@@ -1,8 +1,20 @@
1
+ const path = require('path');
2
+ const { existsSync } = require('fs');
3
+
4
+ const extensions = [];
5
+
6
+ if (existsSync(path.resolve(__dirname, '../../jest'))) {
7
+ extensions.push('jest');
8
+ }
9
+
10
+ if (existsSync(path.resolve(__dirname, '../../react'))) {
11
+ extensions.push('react');
12
+ }
13
+
1
14
  module.exports = {
2
15
  extends: [
3
16
  './base',
4
- './jest',
5
- './react',
17
+ ...extensions,
6
18
  ].map(require.resolve),
7
19
  rules: {},
8
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovixx/eslint-config",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "configs/index.js",
5
5
  "repository": "git@github.com:Innovixx-Development/eslint-config.git",
6
6
  "description": "Opinionated ESLint config for JavaScript developers",
@@ -27,6 +27,23 @@
27
27
  "eslint-plugin-react": "^7.20.0",
28
28
  "eslint-plugin-react-hooks": "^4.0.0"
29
29
  },
30
+ "peerDependenciesMeta": {
31
+ "eslint-plugin-jest": {
32
+ "optional": true
33
+ },
34
+ "eslint-plugin-jest-dom": {
35
+ "optional": true
36
+ },
37
+ "eslint-plugin-jsx-a11y": {
38
+ "optional": true
39
+ },
40
+ "eslint-plugin-react": {
41
+ "optional": true
42
+ },
43
+ "eslint-plugin-react-hooks": {
44
+ "optional": true
45
+ }
46
+ },
30
47
  "dependencies": {
31
48
  "confusing-browser-globals": "^1.0.9",
32
49
  "object.assign": "^4.1.0",