@ivuorinen/eslint-config 0.5.7 → 0.5.8

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
@@ -26,7 +26,7 @@ npm install @ivuorinen/eslint-config --save-dev
26
26
  yarn add @ivuorinen/eslint-config --dev
27
27
  ```
28
28
 
29
- After installing it, a _`.eslintrc.json`_ file will be created automatically in the project's root folder with the following configuration:
29
+ After installing it, a _`eslint.config.mjs`_ file will be created automatically in the project's root folder with the following configuration:
30
30
 
31
31
  ```json
32
32
  {
package/index.cjs CHANGED
@@ -1,16 +1,32 @@
1
+ 'use strict'
2
+
1
3
  const globals = require('globals')
4
+ const configEslint = require('eslint-config-eslint')
5
+ const configPrettier = require('eslint-config-prettier')
6
+ const pluginImport = require('eslint-plugin-import')
2
7
  const pluginJs = require('@eslint/js')
3
- const standard = require('eslint-config-standard')
4
8
  const pluginN = require('eslint-plugin-n')
5
9
  const pluginPromise = require('eslint-plugin-promise')
6
- const pluginImport = require('eslint-plugin-import')
7
- const pluginPrettier = require('eslint-plugin-prettier')
8
- const pluginSonarJS = require('eslint-plugin-sonarjs')
9
10
 
10
11
  /**
11
12
  * @type { import("eslint").Linter.Config[] } config eslint configuration.
12
13
  */
13
14
  module.exports = [
15
+ ...configEslint,
16
+ {
17
+ linterOptions: {
18
+ reportUnusedDisableDirectives: 'warn'
19
+ },
20
+ rules: {
21
+ 'func-style': [
22
+ 'error',
23
+ 'declaration',
24
+ {
25
+ allowArrowFunctions: true
26
+ }
27
+ ]
28
+ }
29
+ },
14
30
  {
15
31
  files: ['**/*.{js,mjs,cjs}'],
16
32
  languageOptions: {
@@ -30,12 +46,10 @@ module.exports = [
30
46
  plugins: {
31
47
  n: pluginN,
32
48
  import: pluginImport,
33
- promise: pluginPromise,
34
- prettier: pluginPrettier,
35
- sonarjs: pluginSonarJS
36
- },
37
- rules: standard.rules
49
+ promise: pluginPromise
50
+ }
38
51
  },
52
+ configPrettier,
39
53
  {
40
54
  ignores: ['coverage/', 'dist/', 'lib/', 'node_modules/']
41
55
  }
package/jest.cjs CHANGED
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const jest = require('eslint-plugin-jest')
2
4
 
3
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivuorinen/eslint-config",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "ivuorinen's shareable configuration for ESLint.",
5
5
  "author": {
6
6
  "name": "Ismo Vuorinen",
@@ -52,16 +52,16 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@eslint/js": "^9",
55
- "@ivuorinen/config-checker": "^1.1.8",
56
- "eslint": "^9",
55
+ "@ivuorinen/config-checker": "^1.1.9",
56
+ "eslint": "^9.15.0",
57
+ "eslint-config-eslint": "^11",
57
58
  "eslint-config-prettier": "^9",
58
- "eslint-config-standard": "^17",
59
59
  "eslint-plugin-import": "^2",
60
60
  "eslint-plugin-jest": "^28",
61
61
  "eslint-plugin-n": "^17",
62
62
  "eslint-plugin-promise": "^7",
63
- "eslint-plugin-sonarjs": "^2",
64
- "globals": "^15"
63
+ "globals": "^15",
64
+ "typescript": ">=4.2.0"
65
65
  },
66
- "gitHead": "7fac921a4e34c1fd1ecdf2255295cac4afc649ad"
66
+ "gitHead": "afea47bfc17ecae32df959b72bf0daaf6c74bf1f"
67
67
  }
@@ -1,9 +1,10 @@
1
1
  'use strict'
2
2
 
3
- const fs = require('fs')
4
- const path = require('path')
5
- // noinspection NpmUsedModulesInstalled
6
- const process = require('process')
3
+ /* eslint no-console: "off", n/no-process-exit: "off" -- CLI app that gives users feedback */
4
+
5
+ const fs = require('node:fs')
6
+ const path = require('node:path')
7
+ const process = require('node:process')
7
8
  const checkConfig = require('@ivuorinen/config-checker')
8
9
  const foundConfig = checkConfig('eslint')
9
10