@ololoepepe/eslint-config 0.0.21 → 0.1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,52 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file. The format is
4
+ based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
5
+ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.1.0] - 2026-06-30
8
+
9
+ A major modernization of the config. **This release contains breaking changes.**
10
+
11
+ ### Changed
12
+
13
+ - **BREAKING:** The package is now **ESM** (`"type": "module"`). Use an ESM
14
+ `eslint.config.js`. CommonJS consumers on Node.js ≥ 22 can still load it via
15
+ `require()` (`require(ESM)` support).
16
+ - **BREAKING:** Migrated to ESLint's **flat config** format; the legacy
17
+ `.eslintrc` format is no longer supported.
18
+ - **BREAKING:** Now requires **ESLint ≥ 10** and **Node.js ≥ 24.11**.
19
+ - Formatting rules are now provided by
20
+ [`@stylistic/eslint-plugin`](https://eslint.style/) (they were removed from
21
+ ESLint core).
22
+ - Import rules now come from
23
+ [`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x)
24
+ (a maintained, ESLint-10-compatible fork of `eslint-plugin-import`).
25
+ - Updated all dependencies to their latest major versions.
26
+
27
+ ### Added
28
+
29
+ - **`@ololoepepe/eslint-config/node`** entry point — the base plus Node globals
30
+ and [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n).
31
+ - **`@ololoepepe/eslint-config/react`** entry point — the base plus
32
+ [`@eslint-react`](https://eslint-react.xyz/),
33
+ [`eslint-plugin-react-hooks`](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks),
34
+ and JSX formatting via `@stylistic`. This supersedes the standalone
35
+ `@ololoepepe/eslint-config-react` package and targets modern function
36
+ components. (`eslint-plugin-react` was dropped: it does not support ESLint 10,
37
+ whereas `@eslint-react` is flat-config/v10-native.)
38
+ - New plugins on the base layer:
39
+ [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn),
40
+ [`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp),
41
+ [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise),
42
+ and
43
+ [`@eslint-community/eslint-plugin-eslint-comments`](https://github.com/eslint-community/eslint-plugin-eslint-comments).
44
+ - A rule-audit script and generated positive/negative test fixtures that
45
+ exercise the configured rules across the base, node, and react layers.
46
+
47
+ ### Fixed
48
+
49
+ - JSX parsing in the base config: `@babel/eslint-parser@8` no longer enables JSX
50
+ via `ecmaFeatures.jsx` alone; it now uses `babelOptions.parserOpts.plugins`.
51
+
52
+ [0.1.0]: https://gitlab.void-walkers.com/libs/eslint-config/-/releases/v0.1.0
package/README.md CHANGED
@@ -1 +1,127 @@
1
- # ESLint config
1
+ # @ololoepepe/eslint-config
2
+
3
+ A shareable [ESLint](https://eslint.org/) configuration for JavaScript projects.
4
+
5
+ It aims to **cover as many cases as possible** and to enforce a **single,
6
+ unambiguous code style** wherever a clear "right answer" exists — leaving a rule
7
+ off only when the preferred style genuinely depends on context, or when a
8
+ compromise is worth it for ergonomics.
9
+
10
+ The config is heavily inspired by [XO](https://github.com/xojs/xo), but it is
11
+ more explicit (every available rule is configured, including the ones turned
12
+ off) and it differs from XO in a number of opinionated choices.
13
+
14
+ ## Highlights
15
+
16
+ - **Flat config** (ESLint's modern format) — exported as a config array.
17
+ - **ESLint 10** with all formatting rules provided by
18
+ [`@stylistic/eslint-plugin`](https://eslint.style/).
19
+ - **Import hygiene** via
20
+ [`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x).
21
+ - **Promise / async correctness** via
22
+ [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise).
23
+ - **Regex correctness & style** via
24
+ [`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp).
25
+ - **Modern idioms & a large catch-all of correctness rules** via
26
+ [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn).
27
+ - **React** (opt-in `/react` layer) via
28
+ [`@eslint-react`](https://eslint-react.xyz/) and the official
29
+ [`eslint-plugin-react-hooks`](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks).
30
+ - **Disciplined `eslint-disable` comments** via
31
+ [`@eslint-community/eslint-plugin-eslint-comments`](https://github.com/eslint-community/eslint-plugin-eslint-comments).
32
+ - **Sorted object keys** via
33
+ [`eslint-plugin-sort-keys-shorthand`](https://github.com/leonardovillela/eslint-plugin-sort-keys-shorthand).
34
+ - **Modern + JSX syntax** parsing via
35
+ [`@babel/eslint-parser`](https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser),
36
+ so the config works as a base for frontend (JSX) configs as well.
37
+
38
+ ## Config entry points
39
+
40
+ The package is **environment-neutral by default** and ships environment layers
41
+ on top of it:
42
+
43
+ - **`@ololoepepe/eslint-config`** — the base config. Language + style + import +
44
+ promise + correctness rules. No environment globals beyond standard ES, no
45
+ Node- or browser-specific rules. Use this directly for environment-agnostic
46
+ code, or as the base for an environment-specific config (e.g. a frontend/JSX
47
+ config that adds browser globals and React rules).
48
+ - **`@ololoepepe/eslint-config/node`** — the base **plus** a Node layer: Node
49
+ globals and [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n).
50
+ Use this for Node.js libraries and applications.
51
+ - **`@ololoepepe/eslint-config/react`** — the base **plus** a React layer:
52
+ browser globals, [`@eslint-react`](https://eslint-react.xyz/),
53
+ `eslint-plugin-react-hooks`, and JSX formatting via `@stylistic`. Targets
54
+ modern function components and lints `.jsx` files. (TypeScript / `.tsx` is a
55
+ separate config; `@eslint-react` pulls in `typescript` as a peer dependency.)
56
+
57
+ ## Requirements
58
+
59
+ - ESLint `>= 10`
60
+ - Node.js `>= 24.11`
61
+
62
+ ## Installation
63
+
64
+ ```sh
65
+ npm install --save-dev @ololoepepe/eslint-config
66
+ ```
67
+
68
+ ## Usage
69
+
70
+ This package is **ESM**. Each entry point exports a flat-config array — spread it
71
+ into your own `eslint.config.js` and add any project-specific overrides
72
+ afterwards.
73
+
74
+ For a **Node.js** project:
75
+
76
+ ```js
77
+ // eslint.config.js
78
+ import ololoepepe from '@ololoepepe/eslint-config/node';
79
+
80
+ export default [
81
+ ...ololoepepe,
82
+ {
83
+ // Your project-specific overrides.
84
+ rules: {}
85
+ }
86
+ ];
87
+ ```
88
+
89
+ For a **React** project:
90
+
91
+ ```js
92
+ // eslint.config.js
93
+ import ololoepepe from '@ololoepepe/eslint-config/react';
94
+
95
+ export default [
96
+ ...ololoepepe,
97
+ {
98
+ // Your project-specific overrides.
99
+ rules: {}
100
+ }
101
+ ];
102
+ ```
103
+
104
+ For an **environment-agnostic** project, or as the base for another config,
105
+ import `@ololoepepe/eslint-config` instead and add the environment globals and
106
+ rules your project needs.
107
+
108
+ > CommonJS consumers on Node.js ≥ 22 can still load it via `require()`
109
+ > (`require(ESM)` is supported), but an ESM `eslint.config.js` is recommended.
110
+
111
+ ## Conventions
112
+
113
+ A few of the style choices the config enforces:
114
+
115
+ - 2-space indentation, Unix line endings, semicolons always, single quotes.
116
+ - Max line length of 120.
117
+ - Object keys sorted (natural, case-insensitive, shorthand first).
118
+ - Imports ordered and grouped, no duplicates, no unresolved.
119
+ - `const` over `let`, never `var`; arrow callbacks; template strings over
120
+ concatenation.
121
+
122
+ JSX-specific layout rules and TypeScript-specific rules are intentionally left
123
+ off here — they belong in the downstream configs that build on this base.
124
+
125
+ ## License
126
+
127
+ UNLICENSED — private package.
package/package.json CHANGED
@@ -1,10 +1,21 @@
1
1
  {
2
2
  "name": "@ololoepepe/eslint-config",
3
- "version": "0.0.21",
3
+ "version": "0.1.0",
4
4
  "description": "ESLint config",
5
+ "type": "module",
5
6
  "main": "src/index.js",
7
+ "exports": {
8
+ ".": "./src/index.js",
9
+ "./node": "./src/node.js",
10
+ "./react": "./src/react.js"
11
+ },
12
+ "imports": {
13
+ "#src/*": "./src/*"
14
+ },
15
+ "engines": {
16
+ "node": ">=24.11"
17
+ },
6
18
  "scripts": {
7
- "find-rules": "eslint-find-rules --unused ./src/index.js",
8
19
  "lint": "eslint ./src",
9
20
  "test": "mocha ./test/*"
10
21
  },
@@ -14,7 +25,8 @@
14
25
  "files": [
15
26
  "src",
16
27
  "package.json",
17
- "README.md"
28
+ "README.md",
29
+ "CHANGELOG.md"
18
30
  ],
19
31
  "repository": {
20
32
  "type": "git",
@@ -27,14 +39,22 @@
27
39
  },
28
40
  "homepage": "https://gitlab.void-walkers.com/libs/eslint-config#README",
29
41
  "dependencies": {
30
- "@babel/core": "7.27.1",
31
- "@babel/eslint-parser": "^7.27.1",
32
- "eslint": "^8.57.1",
33
- "eslint-plugin-import": "^2.31.0",
34
- "eslint-plugin-sort-keys-shorthand": "^2.3.0"
42
+ "@babel/core": "^8.0.1",
43
+ "@babel/eslint-parser": "^8.0.1",
44
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
45
+ "@eslint-react/eslint-plugin": "^5.10.0",
46
+ "@stylistic/eslint-plugin": "^5.10.0",
47
+ "eslint": "^10.6.0",
48
+ "eslint-plugin-import-x": "^4.17.1",
49
+ "eslint-plugin-n": "^18.2.1",
50
+ "eslint-plugin-promise": "^7.3.0",
51
+ "eslint-plugin-react-hooks": "^7.1.1",
52
+ "eslint-plugin-regexp": "^3.1.1",
53
+ "eslint-plugin-sort-keys-shorthand": "^5.1.0",
54
+ "eslint-plugin-unicorn": "^69.0.0",
55
+ "globals": "^17.7.0"
35
56
  },
36
57
  "devDependencies": {
37
- "eslint-find-rules": "^5.0.0",
38
- "mocha": "^11.4.0"
58
+ "mocha": "^11.7.6"
39
59
  }
40
60
  }
package/src/index.js CHANGED
@@ -1,304 +1,65 @@
1
- const {rules: pluginImportRules} = require('./plugins/import');
2
- const {rules: pluginSortKeysShorthandRules} = require('./plugins/sort-keys-shorthand');
3
- const rulesNo = require('./rules/no');
1
+ import babelParser from '@babel/eslint-parser';
2
+ import eslintComments from '@eslint-community/eslint-plugin-eslint-comments';
3
+ import stylistic from '@stylistic/eslint-plugin';
4
+ import importPlugin from 'eslint-plugin-import-x';
5
+ import promise from 'eslint-plugin-promise';
6
+ import regexp from 'eslint-plugin-regexp';
7
+ import sortKeysShorthand from 'eslint-plugin-sort-keys-shorthand';
8
+ import unicorn from 'eslint-plugin-unicorn';
9
+ import globals from 'globals';
4
10
 
5
- module.exports = {
6
- env: {
7
- es2021: true,
8
- node: true
9
- },
10
- parser: '@babel/eslint-parser',
11
- parserOptions: {
12
- ecmaFeatures: {
13
- jsx: true
14
- },
11
+ import {rules as pluginEslintCommentsRules} from '#src/plugins/eslint-comments.js';
12
+ import {rules as pluginImportXRules} from '#src/plugins/import-x.js';
13
+ import {rules as pluginPromiseRules} from '#src/plugins/promise.js';
14
+ import {rules as pluginRegexpRules} from '#src/plugins/regexp.js';
15
+ import {rules as pluginSortKeysShorthandRules} from '#src/plugins/sort-keys-shorthand.js';
16
+ import {rules as pluginStylisticRules} from '#src/plugins/stylistic.js';
17
+ import {rules as pluginUnicornRules} from '#src/plugins/unicorn.js';
18
+ import {rules as rulesCore} from '#src/rules/core.js';
19
+ import {rules as rulesNo} from '#src/rules/no.js';
20
+
21
+ export default [{
22
+ languageOptions: {
15
23
  ecmaVersion: 'latest',
16
- requireConfigFile: false,
24
+ globals: {
25
+ ...globals.es2021
26
+ },
27
+ parser: babelParser,
28
+ parserOptions: {
29
+ babelOptions: {
30
+ parserOpts: {
31
+ plugins: ['jsx']
32
+ }
33
+ },
34
+ ecmaFeatures: {
35
+ jsx: true
36
+ },
37
+ requireConfigFile: false
38
+ },
17
39
  sourceType: 'module'
18
40
  },
19
- plugins: ['import', 'sort-keys-shorthand'],
41
+ linterOptions: {
42
+ reportUnusedDisableDirectives: 'error'
43
+ },
44
+ name: '@ololoepepe/eslint-config',
45
+ plugins: {
46
+ promise,
47
+ regexp,
48
+ unicorn,
49
+ '@eslint-community/eslint-comments': eslintComments,
50
+ '@stylistic': stylistic,
51
+ 'import-x': importPlugin,
52
+ 'sort-keys-shorthand': sortKeysShorthand
53
+ },
20
54
  rules: {
21
- 'accessor-pairs': ['warn', {
22
- enforceForClassMembers: true,
23
- getWithoutSet: false,
24
- setWithoutGet: true
25
- }],
26
- 'array-bracket-newline': ['error', 'consistent'],
27
- 'array-bracket-spacing': ['error', 'never', {
28
- arraysInArrays: false,
29
- objectsInArrays: false,
30
- singleValue: false
31
- }],
32
- 'array-callback-return': ['error', {
33
- allowImplicit: false,
34
- checkForEach: false
35
- }],
36
- 'array-element-newline': ['error', 'consistent'],
37
- 'arrow-body-style': ['error', 'as-needed'],
38
- 'arrow-parens': ['error', 'as-needed', {
39
- requireForBlockBody: false
40
- }],
41
- 'arrow-spacing': ['error', {
42
- after: true,
43
- before: true
44
- }],
45
- 'block-scoped-var': 'error',
46
- 'block-spacing': ['error', 'always'],
47
- 'brace-style': ['error', '1tbs', {
48
- allowSingleLine: false
49
- }],
50
- camelcase: ['error', {
51
- ignoreDestructuring: false,
52
- ignoreGlobals: true,
53
- ignoreImports: false,
54
- properties: 'never'
55
- }],
56
- 'capitalized-comments': ['error', 'always', {
57
- ignoreConsecutiveComments: true,
58
- ignoreInlineComments: false,
59
- ignorePattern: 'webpackChunkName'
60
- }],
61
- 'class-methods-use-this': 'off',
62
- 'comma-dangle': ['error', 'never'],
63
- 'comma-spacing': ['error', {
64
- after: true,
65
- before: false
66
- }],
67
- 'comma-style': ['error', 'last'],
68
- complexity: ['warn', 20],
69
- 'computed-property-spacing': ['error', 'never', {
70
- enforceForClassMembers: true
71
- }],
72
- 'consistent-return': 'off',
73
- 'consistent-this': ['error', 'self'],
74
- 'constructor-super': 'error',
75
- curly: ['error', 'all'],
76
- 'default-case': ['error', {
77
- commentPattern: '^skip\\sdefault'
78
- }],
79
- 'default-case-last': 'error',
80
- 'default-param-last': 'error',
81
- 'dot-location': ['error', 'property'],
82
- 'dot-notation': ['error', {
83
- allowKeywords: true
84
- }],
85
- 'eol-last': ['error', 'always'],
86
- eqeqeq: ['error', 'always'],
87
- 'for-direction': 'error',
88
- 'func-call-spacing': ['error', 'never'],
89
- 'func-name-matching': ['warn', 'always'],
90
- 'func-names': ['error', 'never', {
91
- generators: 'never'
92
- }],
93
- 'func-style': ['error', 'declaration', {
94
- allowArrowFunctions: true
95
- }],
96
- 'function-call-argument-newline': ['error', 'consistent'],
97
- 'function-paren-newline': ['error', 'multiline-arguments'],
98
- 'generator-star-spacing': ['error', {
99
- after: true,
100
- before: true
101
- }],
102
- 'getter-return': ['error', {
103
- allowImplicit: false
104
- }],
105
- 'grouped-accessor-pairs': ['error', 'getBeforeSet'],
106
- 'guard-for-in': 'error',
107
- 'id-denylist': 'off',
108
- 'id-length': 'off',
109
- 'id-match': 'off',
110
- 'implicit-arrow-linebreak': ['error', 'beside'],
111
- indent: ['error', 2],
112
- 'init-declarations': ['error', 'always'],
113
- 'jsx-quotes': ['error', 'prefer-double'],
114
- 'key-spacing': ['error', {
115
- afterColon: true,
116
- beforeColon: false
117
- }],
118
- 'keyword-spacing': ['error', {
119
- after: true,
120
- before: true
121
- }],
122
- 'line-comment-position': 'off',
123
- 'linebreak-style': ['error', 'unix'],
124
- 'lines-around-comment': 'off',
125
- 'lines-between-class-members': ['error', 'always', {
126
- exceptAfterSingleLine: true
127
- }],
128
- 'logical-assignment-operators': ['error', 'always', {
129
- enforceForIfStatements: false
130
- }],
131
- 'max-classes-per-file': 'off',
132
- 'max-depth': ['warn', 5],
133
- 'max-len': ['error', {
134
- code: 120,
135
- comments: 120,
136
- ignoreComments: false,
137
- ignoreRegExpLiterals: false,
138
- ignoreStrings: false,
139
- ignoreTemplateLiterals: false,
140
- ignoreTrailingComments: false,
141
- ignoreUrls: false,
142
- tabWidth: 2
143
- }],
144
- 'max-lines': ['warn', {
145
- max: 500,
146
- skipBlankLines: true,
147
- skipComments: true
148
- }],
149
- 'max-lines-per-function': ['warn', {
150
- IIFEs: true,
151
- max: 100,
152
- skipBlankLines: true,
153
- skipComments: true
154
- }],
155
- 'max-nested-callbacks': ['warn', 5],
156
- 'max-params': ['warn', 4],
157
- 'max-statements': 'off',
158
- 'max-statements-per-line': ['error', {
159
- max: 1
160
- }],
161
- 'multiline-comment-style': 'off',
162
- 'multiline-ternary': 'off',
163
- 'new-cap': ['error', {
164
- capIsNew: true,
165
- newIsCap: true,
166
- properties: true
167
- }],
168
- 'new-parens': ['error', 'always'],
169
- 'newline-per-chained-call': ['error', {
170
- ignoreChainWithDepth: 3
171
- }],
172
- 'nonblock-statement-body-position': 'off',
173
- 'object-curly-newline': 'off',
174
- 'object-curly-spacing': ['error', 'never', {
175
- arraysInObjects: false,
176
- objectsInObjects: false
177
- }],
178
- 'object-property-newline': 'off', // Reconsider
179
- 'object-shorthand': ['error', 'always', {
180
- avoidExplicitReturnArrows: false,
181
- avoidQuotes: true,
182
- ignoreConstructors: false
183
- }],
184
- 'one-var': ['error', 'never'],
185
- 'one-var-declaration-per-line': 'off',
186
- 'operator-assignment': ['error', 'always'],
187
- 'operator-linebreak': ['error', 'after'],
188
- 'padded-blocks': ['error', 'never', {
189
- allowSingleLineBlocks: false
190
- }],
191
- 'padding-line-between-statements': ['error', {
192
- blankLine: 'always',
193
- next: '*',
194
- prev: 'multiline-block-like'
195
- }],
196
- 'prefer-arrow-callback': ['error', {
197
- allowNamedFunctions: false,
198
- allowUnboundThis: true
199
- }],
200
- 'prefer-const': ['error', {
201
- destructuring: 'all',
202
- ignoreReadBeforeAssign: true
203
- }],
204
- 'prefer-destructuring': ['error', {
205
- array: true,
206
- object: true
207
- }, {
208
- enforceForRenamedProperties: false
209
- }],
210
- 'prefer-exponentiation-operator': 'error',
211
- 'prefer-named-capture-group': 'warn',
212
- 'prefer-numeric-literals': 'error',
213
- 'prefer-object-has-own': 'off',
214
- 'prefer-object-spread': 'error',
215
- 'prefer-promise-reject-errors': ['error', {
216
- allowEmptyReject: false
217
- }],
218
- 'prefer-regex-literals': ['error', {
219
- disallowRedundantWrapping: true
220
- }],
221
- 'prefer-rest-params': 'error',
222
- 'prefer-spread': 'error',
223
- 'prefer-template': 'error',
224
- 'quote-props': ['error', 'as-needed', {
225
- keywords: false,
226
- numbers: true,
227
- unnecessary: true
228
- }],
229
- quotes: ['error', 'single', {
230
- allowTemplateLiterals: false,
231
- avoidEscape: true
232
- }],
233
- radix: ['error', 'as-needed'],
234
- 'require-atomic-updates': 'error',
235
- 'require-await': 'error',
236
- 'require-unicode-regexp': 'error',
237
- 'require-yield': 'off',
238
- 'rest-spread-spacing': ['error', 'never'],
239
- semi: ['error', 'always', {
240
- omitLastInOneLineBlock: false
241
- }],
242
- 'semi-spacing': ['error', {
243
- after: true,
244
- before: false
245
- }],
246
- 'semi-style': ['error', 'last'],
247
- 'sort-imports': 'off',
248
- 'sort-keys': 'off',
249
- 'sort-vars': ['error', {
250
- ignoreCase: true
251
- }],
252
- 'space-before-blocks': ['error', 'always'],
253
- 'space-before-function-paren': ['error', {
254
- anonymous: 'always',
255
- asyncArrow: 'always',
256
- named: 'never'
257
- }],
258
- 'space-in-parens': ['error', 'never'],
259
- 'space-infix-ops': ['error', {
260
- int32Hint: false
261
- }],
262
- 'space-unary-ops': ['error', {
263
- nonwords: false,
264
- words: true
265
- }],
266
- 'spaced-comment': ['error', 'always', {
267
- block: {
268
- balanced: true,
269
- exceptions: ['-', '+', '*'],
270
- markers: ['!', '*']
271
- },
272
- line: {
273
- exceptions: ['-', '+', '*'],
274
- markers: ['!', '/', '=>']
275
- }
276
- }],
277
- strict: ['error', 'never'],
278
- 'switch-colon-spacing': ['error', {
279
- after: true,
280
- before: false
281
- }],
282
- 'symbol-description': 'error',
283
- 'template-curly-spacing': ['error', 'never'],
284
- 'template-tag-spacing': ['error', 'never'],
285
- 'unicode-bom': ['error', 'never'],
286
- 'use-isnan': ['error', {
287
- enforceForIndexOf: true,
288
- enforceForSwitchCase: true
289
- }],
290
- 'valid-typeof': ['error', {
291
- requireStringLiterals: false
292
- }],
293
- 'vars-on-top': 'error',
294
- 'wrap-iife': ['error', 'inside', {
295
- functionPrototypeMethods: true
296
- }],
297
- 'wrap-regex': 'off',
298
- 'yield-star-spacing': ['error', 'both'],
299
- yoda: ['error', 'never'],
55
+ ...rulesCore,
300
56
  ...rulesNo,
301
- ...pluginImportRules,
302
- ...pluginSortKeysShorthandRules
57
+ ...pluginEslintCommentsRules,
58
+ ...pluginStylisticRules,
59
+ ...pluginImportXRules,
60
+ ...pluginPromiseRules,
61
+ ...pluginRegexpRules,
62
+ ...pluginSortKeysShorthandRules,
63
+ ...pluginUnicornRules
303
64
  }
304
- };
65
+ }];
package/src/node.js ADDED
@@ -0,0 +1,23 @@
1
+ import n from 'eslint-plugin-n';
2
+ import globals from 'globals';
3
+
4
+ import base from '#src/index.js';
5
+ import {rules as pluginNRules} from '#src/plugins/n.js';
6
+
7
+ export default [
8
+ ...base,
9
+ {
10
+ languageOptions: {
11
+ globals: {
12
+ ...globals.node
13
+ }
14
+ },
15
+ name: '@ololoepepe/eslint-config/node',
16
+ plugins: {
17
+ n
18
+ },
19
+ rules: {
20
+ ...pluginNRules
21
+ }
22
+ }
23
+ ];
@@ -0,0 +1,12 @@
1
+ export const rules = {
2
+ '@eslint-community/eslint-comments/disable-enable-pair': ['error', {
3
+ allowWholeFile: true
4
+ }],
5
+ '@eslint-community/eslint-comments/no-aggregating-enable': 'error',
6
+ '@eslint-community/eslint-comments/no-duplicate-disable': 'error',
7
+ '@eslint-community/eslint-comments/no-restricted-disable': 'off',
8
+ '@eslint-community/eslint-comments/no-unlimited-disable': 'error',
9
+ '@eslint-community/eslint-comments/no-unused-enable': 'error',
10
+ '@eslint-community/eslint-comments/no-use': 'off',
11
+ '@eslint-community/eslint-comments/require-description': 'error'
12
+ };