@madgex/eslint-config-madgex 2.0.0 → 2.2.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.
Files changed (2) hide show
  1. package/index.js +27 -1
  2. package/package.json +2 -3
package/index.js CHANGED
@@ -3,6 +3,7 @@ const js = require('@eslint/js');
3
3
  const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
4
4
  const nodePlugin = require('eslint-plugin-n');
5
5
 
6
+ // https://eslint.org/docs/latest/use/configure/configuration-files
6
7
  module.exports = [
7
8
  {
8
9
  languageOptions: {
@@ -11,15 +12,40 @@ module.exports = [
11
12
  ...globals.browser,
12
13
  },
13
14
  },
15
+ /**
16
+ * https://eslint.org/docs/latest/use/configure/ignore#ignoring-files
17
+ * - `٭٭/node_modules` already ignored
18
+ * - `dist/` => only the root dist folder
19
+ * - `٭٭/dist/` => any dist folder
20
+ */
21
+ ignores: [
22
+ '**/.DS_Store',
23
+ '**/*.local',
24
+ '**/.vscode/',
25
+ '!**/.vscode/extensions.json',
26
+ '**/logs/',
27
+ '**/*.log*',
28
+ '**/.idea/',
29
+ '**/dist/',
30
+ ],
14
31
  },
15
32
  js.configs.recommended,
16
33
  nodePlugin.configs['flat/recommended'],
17
34
  eslintPluginPrettierRecommended,
18
35
  {
19
36
  rules: {
37
+ // https://eslint.org/docs/latest/rules/
20
38
  'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
21
39
  'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
22
- 'prettier/prettier': 'error',
40
+ 'no-param-reassign': ['error', { props: true }],
41
+ eqeqeq: ['error', 'always', { null: 'ignore' }],
42
+ 'no-shadow': 'error',
43
+ 'no-lonely-if': 'error',
44
+ camelcase: ['error', { properties: 'never', ignoreDestructuring: false }],
45
+ 'no-bitwise': 'error',
46
+ 'default-case': 'error',
47
+ 'consistent-return': 'error',
48
+ 'func-names': 'warn',
23
49
  },
24
50
  },
25
51
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madgex/eslint-config-madgex",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "type": "commonjs",
5
5
  "description": "Madgex ESLint config - based on eslint-config-airbnb",
6
6
  "main": "index.js",
@@ -23,6 +23,5 @@
23
23
  },
24
24
  "engines": {
25
25
  "node": ">=18"
26
- },
27
- "gitHead": "2bbdb8be7d056e210ce28579c116e05d2f9362c8"
26
+ }
28
27
  }