@signpostmarv/eslint-config 0.3.0 → 0.5.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/javascript.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import type { Linter } from 'eslint';
1
+ import type { ESLint, Linter } from 'eslint';
2
2
  export declare const javascript: ({
3
+ readonly plugins: Record<string, ESLint.Plugin>;
3
4
  readonly rules: Readonly<Linter.RulesRecord>;
4
5
  } | {
5
6
  name?: string;
package/javascript.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import js from '@eslint/js';
2
2
  import typescript_eslint from 'typescript-eslint';
3
+ import stylistic from '@stylistic/eslint-plugin';
3
4
  export const javascript = [
4
5
  js.configs.recommended,
5
6
  ...typescript_eslint.configs.recommended,
6
7
  {
8
+ plugins: {
9
+ '@stylistic': stylistic,
10
+ },
7
11
  rules: {
8
12
  '@typescript-eslint/member-ordering': ['error', {
9
13
  default: {
@@ -50,18 +54,108 @@ export const javascript = [
50
54
  order: 'natural-case-insensitive',
51
55
  },
52
56
  }],
53
- 'comma-dangle': ['error', 'always-multiline'],
54
- indent: ['error', 'tab', {
55
- ignoredNodes: ['TemplateLiteral > *'],
56
- ImportDeclaration: 1,
57
+ 'sort-imports': ['error', {
58
+ ignoreCase: true,
59
+ ignoreDeclarationSort: true,
60
+ ignoreMemberSort: false,
61
+ memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'],
62
+ }],
63
+ '@stylistic/array-bracket-newline': ['error', 'consistent'],
64
+ '@stylistic/array-bracket-spacing': ['error', 'never'],
65
+ '@stylistic/array-element-newline': ['error', 'consistent'],
66
+ '@stylistic/arrow-parens': ['error', 'always'],
67
+ '@stylistic/arrow-spacing': ['error', { before: true, after: true }],
68
+ '@stylistic/block-spacing': ['error', 'always'],
69
+ '@stylistic/brace-style': ['error', '1tbs'],
70
+ '@stylistic/comma-dangle': ['error', 'always-multiline'],
71
+ '@stylistic/comma-spacing': ['error', {
72
+ before: false,
73
+ after: true,
57
74
  }],
58
- 'max-len': ['warn', 79, {
59
- ignoreTemplateLiterals: true,
75
+ '@stylistic/computed-property-spacing': ['error', 'never'],
76
+ '@stylistic/curly-newline': ['error', { consistent: true }],
77
+ '@stylistic/dot-location': ['error', 'property'],
78
+ '@stylistic/eol-last': ['error', 'always'],
79
+ '@stylistic/function-call-argument-newline': [
80
+ 'error',
81
+ 'consistent',
82
+ ],
83
+ '@stylistic/function-call-spacing': ['error', 'never'],
84
+ '@stylistic/generator-star-spacing': ['error', 'after'],
85
+ '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
86
+ '@stylistic/indent': ['error', 'tab'],
87
+ '@stylistic/indent-binary-ops': ['error', 'tab'],
88
+ '@stylistic/key-spacing': ['error', {
89
+ beforeColon: false,
90
+ afterColon: true,
91
+ mode: 'strict',
92
+ }],
93
+ '@stylistic/linebreak-style': ['error', 'unix'],
94
+ '@stylistic/lines-around-comment': ['error', {
95
+ beforeBlockComment: true,
96
+ afterBlockComment: false,
97
+ beforeLineComment: true,
98
+ afterLineComment: false,
99
+ allowBlockStart: true,
100
+ allowBlockEnd: false,
101
+ allowClassStart: false,
102
+ allowClassEnd: false,
103
+ allowObjectStart: true,
104
+ allowObjectEnd: false,
105
+ allowArrayStart: true,
106
+ allowArrayEnd: false,
107
+ afterHashbangComment: true,
108
+ }],
109
+ '@stylistic/lines-between-class-members': ['error', 'always', {
110
+ exceptAfterOverload: true,
111
+ }],
112
+ '@stylistic/max-len': ['warn', {
113
+ code: 79,
114
+ }],
115
+ '@stylistic/max-statements-per-line': ['error', { max: 1 }],
116
+ '@stylistic/member-delimiter-style': ['error', {
117
+ multiline: {
118
+ delimiter: 'comma',
119
+ requireLast: true,
120
+ },
121
+ singleline: {
122
+ delimiter: 'comma',
123
+ requireLast: false,
124
+ },
125
+ overrides: {
126
+ interface: {
127
+ multiline: {
128
+ delimiter: 'semi',
129
+ requireLast: true,
130
+ },
131
+ singleline: {
132
+ delimiter: 'semi',
133
+ requireLast: false,
134
+ },
135
+ },
136
+ },
60
137
  }],
61
- 'object-curly-newline': ['error', {
138
+ '@stylistic/multiline-ternary': ['error', 'always-multiline'],
139
+ '@stylistic/new-parens': ['error', 'always'],
140
+ '@stylistic/no-confusing-arrow': ['error'],
141
+ '@stylistic/no-extra-semi': ['error'],
142
+ '@stylistic/no-floating-decimal': ['error'],
143
+ '@stylistic/no-mixed-operators': ['error'],
144
+ '@stylistic/no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
145
+ '@stylistic/no-multi-spaces': ['error'],
146
+ '@stylistic/no-multiple-empty-lines': ['error'],
147
+ '@stylistic/no-tabs': ['error', { allowIndentationTabs: true }],
148
+ '@stylistic/no-trailing-spaces': ['error'],
149
+ '@stylistic/no-whitespace-before-property': ['error'],
150
+ '@stylistic/object-curly-newline': ['error', {
62
151
  ImportDeclaration: 'always',
152
+ ExportDeclaration: 'always',
63
153
  }],
64
- 'operator-linebreak': ['error', 'after', {
154
+ '@stylistic/one-var-declaration-per-line': [
155
+ 'error',
156
+ 'initializations',
157
+ ],
158
+ '@stylistic/operator-linebreak': ['error', 'before', {
65
159
  overrides: {
66
160
  '?': 'before',
67
161
  ':': 'before',
@@ -69,12 +163,53 @@ export const javascript = [
69
163
  '||': 'before',
70
164
  },
71
165
  }],
72
- 'sort-imports': ['error', {
73
- ignoreCase: true,
74
- ignoreDeclarationSort: true,
75
- ignoreMemberSort: false,
76
- memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'],
166
+ '@stylistic/padded-blocks': ['error', 'never'],
167
+ '@stylistic/padding-line-between-statements': [
168
+ 'error',
169
+ { blankLine: 'always', prev: '*', next: 'return' },
170
+ ],
171
+ '@stylistic/quote-props': ['error', 'as-needed'],
172
+ '@stylistic/quotes': ['error', 'single', {
173
+ allowTemplateLiterals: 'always',
174
+ }],
175
+ '@stylistic/rest-spread-spacing': ['error', 'never'],
176
+ '@stylistic/semi': ['error', 'always'],
177
+ '@stylistic/semi-spacing': ['error', { before: false, after: true }],
178
+ '@stylistic/semi-style': ['error', 'last'],
179
+ '@stylistic/space-before-blocks': ['error', 'always'],
180
+ '@stylistic/space-before-function-paren': ['error', {
181
+ anonymous: 'never',
182
+ named: 'never',
183
+ asyncArrow: 'always',
184
+ catch: 'always',
185
+ }],
186
+ '@stylistic/space-in-parens': ['error', 'never'],
187
+ '@stylistic/space-infix-ops': ['error', {
188
+ int32Hint: true,
189
+ ignoreTypes: true,
190
+ }],
191
+ '@stylistic/space-unary-ops': ['error'],
192
+ '@stylistic/spaced-comment': ['error', 'always'],
193
+ '@stylistic/switch-colon-spacing': ['error', {
194
+ before: false,
195
+ after: true,
196
+ }],
197
+ '@stylistic/template-curly-spacing': ['error', 'never'],
198
+ '@stylistic/template-tag-spacing': ['error', 'never'],
199
+ '@stylistic/type-annotation-spacing': ['error', {
200
+ before: false,
201
+ after: true,
202
+ overrides: {
203
+ arrow: {
204
+ before: true,
205
+ after: true,
206
+ },
207
+ },
77
208
  }],
209
+ '@stylistic/type-generic-spacing': ['error'],
210
+ '@stylistic/type-named-tuple-spacing': ['error'],
211
+ '@stylistic/wrap-iife': ['error', 'inside'],
212
+ '@stylistic/yield-star-spacing': ['error', 'after'],
78
213
  },
79
214
  },
80
215
  {
package/package.json CHANGED
@@ -11,23 +11,25 @@
11
11
  "exports": "./index.js",
12
12
  "types": "./index.d.ts",
13
13
  "devDependencies": {
14
- "@eslint/js": "^9.34.0",
14
+ "@eslint/js": "^9.36.0",
15
+ "@stylistic/eslint-plugin": "^5.4.0",
15
16
  "@types/eslint": "^9.6.1",
16
- "@types/node": "^22.13.10",
17
- "@typescript-eslint/parser": "^8.42.0",
17
+ "@types/node": "^24.5.2",
18
+ "@typescript-eslint/parser": "^8.44.1",
18
19
  "c8": "^10.1.3",
19
- "jiti": "^2.5.1",
20
- "prettier": "^3.5.3",
20
+ "jiti": "^2.6.0",
21
+ "prettier": "^3.6.2",
21
22
  "typescript": "~5.9.2",
22
- "typescript-eslint": "^8.42.0"
23
+ "typescript-eslint": "^8.44.1"
23
24
  },
24
25
  "peerDependencies": {
25
- "@eslint/js": "^9.34.0",
26
+ "@eslint/js": "^9.36.0",
27
+ "@stylistic/eslint-plugin": "^5.4.0",
26
28
  "@types/eslint": "^9.6.1",
27
- "typescript-eslint": "^8.42.0"
29
+ "typescript-eslint": "^8.44.1"
28
30
  },
29
31
  "optionalDependencies": {
30
- "@typescript-eslint/parser": "^8.42.0"
32
+ "@typescript-eslint/parser": "^8.44.1"
31
33
  },
32
- "version": "0.3.0"
34
+ "version": "0.5.0"
33
35
  }
package/typescript.js CHANGED
@@ -3,5 +3,13 @@ import typescript_eslint from 'typescript-eslint';
3
3
  export const typescript = [
4
4
  ...config,
5
5
  ...typescript_eslint.configs.recommendedTypeChecked,
6
+ {
7
+ rules: {
8
+ '@typescript-eslint/consistent-type-imports': ['error', {
9
+ fixStyle: 'separate-type-imports',
10
+ prefer: 'type-imports',
11
+ }],
12
+ },
13
+ },
6
14
  ];
7
15
  export default typescript;