@jarsec/eslint-config 6.0.1 → 6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @jarsec/eslint-config
2
2
 
3
+ ## 6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8e131a4: Disable type-checking rules for JavaScript files
8
+ - 5a293fc: - Update deprecated unicorn config
9
+ - Remove deprecated `flat` option from @stylistic factory function
10
+
11
+ ### Patch Changes
12
+
13
+ - ea1d64a: chore(deps): update dependency @stylistic/eslint-plugin to v4
14
+ - 8e60259: chore(deps): update dependency eslint-plugin-n to ^17.15.1
15
+ - df31669: chore(deps): update dependency eslint-plugin-perfectionist to v4
16
+ - c4b8a13: chore(deps): update eslint monorepo
17
+ - 185c428: chore(deps): update dependency typescript-eslint to ^8.24.1
18
+ - 2693c75: chore(deps): update dependency typescript-eslint to ^8.26.0
19
+ - 54f5069: chore(deps): update eslint monorepo to ^9.21.0
20
+ - 4938aaf: chore(deps): update dependency @stylistic/eslint-plugin to ^4.2.0
21
+
22
+ ## 6.1.0
23
+
24
+ ### Minor Changes
25
+
26
+ - ea942b3: Turn ASI off
27
+ - bf4b7f2: Re-require semicolons and up indent to 4 spaces
28
+ - 2265b31: Codify preference for types over interfaces
29
+ - 4e31593: multiline-comment-style: use starred-block instead of separate-lines
30
+
3
31
  ## 6.0.1
4
32
 
5
33
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # ESLint Configuration
2
+
3
+ *Note:* This configuration requires ESLint >9.
4
+
5
+ This package contains my standard ESLint configuration.
6
+
7
+ Rules are collected from the following shared configurations:
8
+
9
+ - `eslint` recommended configuration.
10
+ - `typescript-eslint` recommended and stylistic configurations.
11
+ - `eslint-plugin-unicorn`
12
+ - `eslint-plugin-perfectionist`
13
+ - `@stylistic` code style configuration.
14
+
15
+ ### Installation
16
+
17
+ ```
18
+ npm install --save-dev @jarsec/eslint-config
19
+ ```
20
+
21
+ ### Usage
22
+
23
+ ```js
24
+ import config from '@jarsec/eslint.config';
25
+
26
+ export default [
27
+ ...config,
28
+ // other configurations
29
+ ]
30
+ ```
package/index.mjs CHANGED
@@ -8,32 +8,41 @@ import unicorn from 'eslint-plugin-unicorn';
8
8
  import tseslint from 'typescript-eslint';
9
9
 
10
10
  export default tseslint.config(
11
- eslint.configs.recommended,
12
- ...tseslint.configs.recommended,
13
- ...tseslint.configs.stylistic,
14
- nodePlugin.configs['flat/recommended'],
15
- unicorn.configs['flat/recommended'],
16
- perfectionist.configs['recommended-natural'],
17
- stylistic.configs.customize({
18
- arrowParens: false,
19
- blockSpacing: true,
20
- braceStyle: '1tbs',
21
- commaDangle: 'always-multiline',
22
- flat: true,
23
- indent: 2,
24
- jsx: true,
25
- pluginName: '@stylistic',
26
- quoteProps: 'consistent-as-needed',
27
- quotes: 'single',
28
- semi: true,
29
- }),
30
- {
31
- rules: {
32
- 'multiline-comment-style': ['error', 'separate-lines'],
33
- 'n/no-missing-import': 'off',
34
- 'n/no-process-exit': 'off',
35
- 'unicorn/no-process-exit': 'off',
36
- 'unicorn/prevent-abbreviations': 'off',
11
+ eslint.configs.recommended,
12
+ ...tseslint.configs.recommended,
13
+ ...tseslint.configs.stylistic,
14
+ nodePlugin.configs['flat/recommended'],
15
+ unicorn.configs.recommended,
16
+ perfectionist.configs['recommended-natural'],
17
+ stylistic.configs.customize({
18
+ arrowParens: false,
19
+ blockSpacing: true,
20
+ braceStyle: '1tbs',
21
+ commaDangle: 'always-multiline',
22
+ indent: 4,
23
+ jsx: true,
24
+ pluginName: '@stylistic',
25
+ quoteProps: 'consistent-as-needed',
26
+ quotes: 'single',
27
+ semi: true,
28
+ }),
29
+ {
30
+ rules: {
31
+ '@typescript-eslint/consistent-type-definitions': [
32
+ 'error',
33
+ 'type',
34
+ ],
35
+ 'multiline-comment-style': ['error', 'starred-block'],
36
+ 'n/no-missing-import': 'off',
37
+ 'n/no-process-exit': 'off',
38
+ 'unicorn/no-process-exit': 'off',
39
+ 'unicorn/prevent-abbreviations': 'off',
40
+ },
41
+ },
42
+ {
43
+ extends: [
44
+ tseslint.configs.disableTypeChecked,
45
+ ],
46
+ files: ['**/*.js'],
37
47
  },
38
- },
39
48
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jarsec/eslint-config",
3
- "version": "6.0.1",
3
+ "version": "6.2.0",
4
4
  "description": "jsec's eslint configurations",
5
5
  "author": "Jarrod Seccombe <jarrod.seccombe@icloud.com>",
6
6
  "license": "MIT",
@@ -11,20 +11,16 @@
11
11
  ".": "./index.mjs"
12
12
  },
13
13
  "dependencies": {
14
- "@eslint/js": "^9.13.0",
15
- "@stylistic/eslint-plugin": "^2.9.0",
16
- "@types/eslint__js": "^8.42.3",
17
- "@types/node": "^20.11.20",
18
- "eslint": "^9.13.0",
19
- "eslint-plugin-n": "^17.11.1",
20
- "eslint-plugin-perfectionist": "^3.9.1",
21
- "eslint-plugin-unicorn": "^56.0.0",
22
- "typescript": "^5.3.3",
23
- "typescript-eslint": "^8.11.0"
14
+ "@eslint/js": "^9.21.0",
15
+ "@stylistic/eslint-plugin": "^4.2.0",
16
+ "eslint-plugin-n": "^17.16.1",
17
+ "eslint-plugin-perfectionist": "^4.9.0",
18
+ "eslint-plugin-unicorn": "^57.0.0",
19
+ "typescript-eslint": "^8.26.0"
24
20
  },
25
21
  "devDependencies": {
26
- "@types/node": "^20.11.20",
27
- "eslint": "^9.0.0",
22
+ "@types/node": "^20.17.23",
23
+ "eslint": "^9.21.0",
28
24
  "typescript": "^5.3.3"
29
25
  },
30
26
  "peerDependencies": {
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- .eslintrc.js
package/configs/style.js DELETED
@@ -1,142 +0,0 @@
1
- module.exports = {
2
- '@stylistic/array-bracket-newline': ['error', 'consistent'],
3
- '@stylistic/array-bracket-spacing': ['error', 'never', {
4
- arraysInArrays: true,
5
- objectsInArrays: false,
6
- singleValue: true
7
- }],
8
- '@stylistic/array-element-newline': ['error', 'consistent'],
9
- '@stylistic/arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
10
- '@stylistic/arrow-spacing': 'error',
11
- '@stylistic/block-spacing': 'error',
12
- '@stylistic/brace-style': ['error', '1tbs', {
13
- allowSingleLine: true
14
- }],
15
- '@stylistic/comma-dangle': ['error', 'only-multiline'],
16
- '@stylistic/comma-spacing': 'error',
17
- '@stylistic/comma-style': ['error', 'last'],
18
- '@stylistic/computed-property-spacing': ['error', 'never', { enforceForClassMembers: true }],
19
- '@stylistic/dot-location': ['error', 'property'],
20
- '@stylistic/eol-last': ['error', 'always'],
21
- '@stylistic/function-call-argument-newline': ['error', 'consistent'],
22
- '@stylistic/function-call-spacing': 'error',
23
- '@stylistic/function-paren-newline': ['error', 'consistent'],
24
- '@stylistic/generator-star-spacing': ['error', 'after'],
25
- '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
26
- '@stylistic/indent': ['error', 2],
27
- '@stylistic/indent-binary-ops': ['error', 2],
28
- '@stylistic/key-spacing': ['error', {
29
- multiLine: {
30
- afterColon: true,
31
- beforeColon: false,
32
- mode: 'strict'
33
- },
34
- singleLine: {
35
- afterColon: true,
36
- beforeColon: false,
37
- mode: 'strict'
38
- }
39
- }],
40
- '@stylistic/keyword-spacing': 'error',
41
- '@stylistic/linebreak-style': ['error', 'unix'],
42
- '@stylistic/lines-around-comment': ['error', {
43
- allowBlockStart: true,
44
- beforeBlockComment: true,
45
- }],
46
- '@stylistic/lines-between-class-members': ['error', 'always'],
47
- '@stylistic/max-len': ['error', {
48
- code: 100,
49
- comments: 80,
50
- ignoreTrailingComments: true,
51
- ignoreUrls: true,
52
- tabWidth: 2
53
- }],
54
- '@stylistic/max-statements-per-line': ['error', { max: 2 }],
55
- '@stylistic/member-delimiter-style': ['error', {
56
- multiline: {
57
- delimiter: 'comma',
58
- requireLast: true
59
- },
60
- multilineDetection: 'brackets',
61
- singleline: {
62
- delimiter: 'comma',
63
- requireLast: false
64
- }
65
- }],
66
- '@stylistic/multiline-ternary': ['error', 'always'],
67
- '@stylistic/new-parens': ['error', 'always'],
68
- '@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }],
69
- '@stylistic/no-confusing-arrow': ['error', {
70
- allowParens: true,
71
- onlyOneSimpleParam: true
72
- }],
73
- '@stylistic/no-extra-parens': ['error', 'all', {
74
- nestedBinaryExpressions: false
75
- }],
76
- '@stylistic/no-extra-semi': 'error',
77
- '@stylistic/no-floating-decimal': 'error',
78
- '@stylistic/no-mixed-operators': 'error',
79
- '@stylistic/no-mixed-spaces-and-tabs': 'error',
80
- '@stylistic/no-multi-spaces': 'error',
81
- '@stylistic/no-multiple-empty-lines': ['error', {
82
- max: 1,
83
- maxEOF: 1
84
- }],
85
- '@stylistic/no-tabs': ['error', { allowIndentationTabs: true }],
86
- '@stylistic/no-trailing-spaces': ['error', {
87
- ignoreComments: false,
88
- skipBlankLines: false
89
- }],
90
- '@stylistic/no-whitespace-before-property': 'error',
91
- '@stylistic/nonblock-statement-body-position': ['error', 'below'],
92
- '@stylistic/object-curly-newline': ['error', {
93
- consistent: true,
94
- minProperties: 3
95
- }],
96
- '@stylistic/object-curly-spacing': ['error', 'always', {
97
- arraysInObjects: false,
98
- objectsInObjects: false
99
- }],
100
- '@stylistic/one-var-declaration-per-line': ['error', 'initializations'],
101
- '@stylistic/operator-linebreak': ['error', 'after', {
102
- overrides: {
103
- ':': 'before',
104
- '?': 'before'
105
- }
106
- }],
107
- '@stylistic/padded-blocks': ['error', 'never'],
108
- '@stylistic/quote-props': ['error', 'consistent-as-needed'],
109
- '@stylistic/quotes': ['error', 'single', {
110
- allowTemplateLiterals: true,
111
- avoidEscape: true
112
- }],
113
- '@stylistic/rest-spread-spacing': ['error', 'never'],
114
- '@stylistic/semi': ['error', 'always'],
115
- '@stylistic/semi-spacing': 'error',
116
- '@stylistic/semi-style': 'error',
117
- '@stylistic/space-before-blocks': 'error',
118
- '@stylistic/space-before-function-paren': ['error', {
119
- anonymous: 'always',
120
- asyncArrow: 'always',
121
- named: 'never'
122
- }],
123
- '@stylistic/space-in-parens': ['error', 'never'],
124
- '@stylistic/switch-colon-spacing': 'error',
125
- '@stylistic/template-curly-spacing': 'error',
126
- '@stylistic/template-tag-spacing': ['error', 'always'],
127
- '@stylistic/type-annotation-spacing': ['error', {
128
- after: true,
129
- before: false,
130
- overrides: {
131
- arrow: {
132
- after: true,
133
- before: true
134
- }
135
- }
136
- }],
137
- '@stylistic/type-generic-spacing': 'error',
138
- '@stylistic/type-named-tuple-spacing': 'error',
139
- '@stylistic/wrap-regex': 'error',
140
- '@stylistic/yield-star-spacing': ['error', 'after']
141
- };
142
-