@radham/eslint-config 1.0.1 → 3.0.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 CHANGED
@@ -6,6 +6,24 @@ All notable changes to this project will be documented in this file.
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ [3.0.0] - 2025-09-08
10
+ --------------------
11
+
12
+ ### Changed
13
+
14
+ - Set an override on the `@stylistic/operator-linebreak` rule for the `|` operator to `'before'`.
15
+
16
+ [2.0.0] - 2025-08-25
17
+ --------------------
18
+
19
+ ### Added
20
+
21
+ - Set the `@typescript-eslint/no-unused-vars` options `argsIgnorePattern` and `destructuredArrayIgnorePattern` to `'^_'`.
22
+
23
+ ### Changed
24
+
25
+ - Update the `@typescript-eslint/no-unused-vars` option `caughtErrorsIgnorePattern` to `'^_'` from `'^_$'`.
26
+
9
27
  [1.0.1] - 2025-08-25
10
28
  --------------------
11
29
 
@@ -24,5 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
42
 
25
43
  - Initial release.
26
44
 
45
+ [3.0.0]: https://github.com/jbenner-radham/eslint-config/compare/v2.0.0...v3.0.0
46
+ [2.0.0]: https://github.com/jbenner-radham/eslint-config/compare/v1.0.1...v2.0.0
27
47
  [1.0.1]: https://github.com/jbenner-radham/eslint-config/compare/v1.0.0...v1.0.1
28
48
  [1.0.0]: https://github.com/jbenner-radham/eslint-config/releases/tag/v1.0.0
package/README.md CHANGED
@@ -14,13 +14,15 @@ Usage
14
14
  -----
15
15
 
16
16
  ```javascript
17
- import { defineConfig } from 'eslint/config';
18
17
  import radham from '@radham/eslint-config';
18
+ import { defineConfig } from 'eslint/config';
19
+ import globals from 'globals';
19
20
 
20
21
  export default defineConfig([
21
22
  {
22
23
  files: ['**/*.ts'],
23
- extends: [radham]
24
+ extends: [radham],
25
+ languageOptions: { globals: globals.node /* or `globals.browser` */ }
24
26
  }
25
27
  ]);
26
28
  ```
@@ -28,4 +30,4 @@ export default defineConfig([
28
30
  License
29
31
  -------
30
32
 
31
- The BSD 3-Clause License (Revised). See the [license file](LICENSE) for details.
33
+ The BSD 3-Clause license. See the [license file](LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radham/eslint-config",
3
- "version": "1.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "A shareable ESLint config with Stylistic.",
5
5
  "keywords": [
6
6
  "eslint",
package/src/index.js CHANGED
@@ -1,17 +1,15 @@
1
1
  import js from '@eslint/js';
2
2
  import stylistic from '@stylistic/eslint-plugin';
3
+ import { defineConfig } from 'eslint/config';
3
4
  import sort from 'eslint-plugin-sort';
4
5
  import tseslint from 'typescript-eslint';
5
6
 
6
- /** @type {import('eslint').Linter.Config[]} */
7
- const config = [
8
- js.configs.recommended,
7
+ export default defineConfig([
9
8
  sort.configs['flat/recommended'],
10
- ...tseslint.configs.recommended,
9
+ tseslint.configs.recommended,
11
10
  {
12
- plugins: {
13
- '@stylistic': stylistic
14
- },
11
+ plugins: { '@stylistic': stylistic, js },
12
+ extends: ['js/recommended'],
15
13
  rules: {
16
14
  '@stylistic/arrow-parens': ['error', 'as-needed'],
17
15
  '@stylistic/arrow-spacing': ['error', { before: true, after: true }],
@@ -47,16 +45,9 @@ const config = [
47
45
  '@stylistic/no-whitespace-before-property': 'error',
48
46
  '@stylistic/object-curly-spacing': ['error', 'always'],
49
47
  '@stylistic/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
50
- '@stylistic/operator-linebreak': [
51
- 'error',
52
- 'after',
53
- {
54
- overrides: {
55
- '?': 'before',
56
- ':': 'before'
57
- }
58
- }
59
- ],
48
+ '@stylistic/operator-linebreak': ['error', 'after', {
49
+ overrides: { '?': 'before', ':': 'before', '|': 'before' }
50
+ }],
60
51
  '@stylistic/padded-blocks': ['error', 'never'],
61
52
  '@stylistic/padding-line-between-statements': [
62
53
  'error',
@@ -86,7 +77,11 @@ const config = [
86
77
  '@stylistic/type-generic-spacing': 'error',
87
78
  '@stylistic/type-named-tuple-spacing': 'error',
88
79
  '@stylistic/wrap-iife': ['error', 'inside'],
89
- '@typescript-eslint/no-unused-vars': ['error', { caughtErrorsIgnorePattern: '^_$' }],
80
+ '@typescript-eslint/no-unused-vars': ['error', {
81
+ argsIgnorePattern: '^_',
82
+ caughtErrorsIgnorePattern: '^_',
83
+ destructuredArrayIgnorePattern: '^_'
84
+ }],
90
85
  'sort/destructuring-properties': 'off',
91
86
  'sort/exports': [
92
87
  'error',
@@ -106,6 +101,4 @@ const config = [
106
101
  'prefer-const': ['error', { destructuring: 'any', ignoreReadBeforeAssign: false }]
107
102
  }
108
103
  }
109
- ];
110
-
111
- export default config;
104
+ ]);