File tree Expand file tree Collapse file tree 12 files changed +119
-135
lines changed Expand file tree Collapse file tree 12 files changed +119
-135
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "$schema" : " https://docs.renovatebot.com/renovate-schema.json" ,
3
- "extends" : [" github>eslint/eslint//.github/renovate.json5" ]
2
+ "$schema" : " https://docs.renovatebot.com/renovate-schema.json" ,
3
+ "extends" : [" github>eslint/eslint//.github/renovate.json5" ]
4
4
}
Original file line number Diff line number Diff line change 34
34
node-version : ' lts/*'
35
35
- run : npm install
36
36
- run : npm run lint
37
+ - run : npm run format:check
37
38
38
39
test-remote :
39
40
name : eslint-remote-tester
Original file line number Diff line number Diff line change 1
1
{
2
2
"line-length" : false ,
3
- "no-inline-html" : false
3
+ "no-inline-html" : false ,
4
+ "no-duplicate-heading" : {
5
+ "siblings_only" : true
6
+ }
4
7
}
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
- The MIT License (MIT)
2
- =====================
1
+ # The MIT License (MIT)
3
2
4
3
Copyright © 2016 Teddy Katz
5
4
Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ import { fileURLToPath } from 'node:url';
3
3
import js from '@eslint/js' ;
4
4
import { FlatCompat } from '@eslint/eslintrc' ;
5
5
import { defineConfig } from 'eslint/config' ;
6
+ import prettier from 'eslint-config-prettier/flat' ;
6
7
import markdown from 'eslint-plugin-markdown' ;
7
8
import pluginN from 'eslint-plugin-n' ;
9
+ import unicorn from 'eslint-plugin-unicorn' ;
10
+
8
11
import eslintPlugin from './lib/index.js' ;
9
12
10
13
const dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
@@ -25,9 +28,8 @@ export default defineConfig([
25
28
...compat . extends (
26
29
'not-an-aardvark/node' ,
27
30
'plugin:@eslint-community/eslint-comments/recommended' ,
28
- 'plugin:prettier/recommended' ,
29
- 'plugin:unicorn/recommended' ,
30
31
) ,
32
+ unicorn . configs . recommended ,
31
33
pluginN . configs [ 'flat/recommended' ] ,
32
34
{
33
35
rules : {
@@ -82,4 +84,5 @@ export default defineConfig([
82
84
'unicorn/filename-case' : 'off' ,
83
85
} ,
84
86
} ,
87
+ prettier ,
85
88
] ) ;
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ import testCaseShorthandStrings from './rules/test-case-shorthand-strings.js';
41
41
42
42
const require = createRequire ( import . meta. url ) ;
43
43
44
- const packageMetadata = require ( " ../package.json" ) as {
45
- name : string ;
46
- version : string ;
44
+ const packageMetadata = require ( ' ../package.json' ) as {
45
+ name : string ;
46
+ version : string ;
47
47
} ;
48
48
49
49
const PLUGIN_NAME = packageMetadata . name . replace ( / ^ e s l i n t - p l u g i n - / , '' ) ;
Original file line number Diff line number Diff line change @@ -56,15 +56,19 @@ const rule: Rule.RuleModule = {
56
56
sourceCode . getTokenBefore ( onlyProperty ) ;
57
57
const tokenAfter =
58
58
sourceCode . getTokenAfter ( onlyProperty ) ;
59
- if ( ( tokenBefore && tokenAfter ) &&
59
+ if (
60
+ tokenBefore &&
61
+ tokenAfter &&
60
62
( ( isCommaToken ( tokenBefore ) &&
61
63
isCommaToken ( tokenAfter ) ) || // In middle of properties
62
- ( isOpeningBraceToken ( tokenBefore ) &&
63
- isCommaToken ( tokenAfter ) ) ) // At beginning of properties
64
+ ( isOpeningBraceToken ( tokenBefore ) &&
65
+ isCommaToken ( tokenAfter ) ) ) // At beginning of properties
64
66
) {
65
67
yield fixer . remove ( tokenAfter ) ; // Remove extra comma.
66
68
}
67
- if ( ( tokenBefore && tokenAfter ) &&
69
+ if (
70
+ tokenBefore &&
71
+ tokenAfter &&
68
72
isCommaToken ( tokenBefore ) &&
69
73
isClosingBraceToken ( tokenAfter )
70
74
) {
Original file line number Diff line number Diff line change 12
12
"license" : " MIT" ,
13
13
"scripts" : {
14
14
"build" : " tsup" ,
15
+ "format" : " prettier --write ." ,
16
+ "format:check" : " prettier --check ." ,
15
17
"lint" : " npm-run-all --continue-on-error --aggregate-output --parallel lint:*" ,
16
18
"lint:docs" : " markdownlint \" **/*.md\" " ,
17
19
"lint:eslint-docs" : " npm-run-all -s build \" update:eslint-docs -- --check\" " ,
68
70
"eslint-doc-generator" : " ^2.2.2" ,
69
71
"eslint-plugin-markdown" : " ^5.1.0" ,
70
72
"eslint-plugin-n" : " ^17.21.0" ,
71
- "eslint-plugin-prettier" : " ^5.5.3" ,
72
- "eslint-plugin-unicorn" : " ^56.0.1" ,
73
+ "eslint-plugin-unicorn" : " ^60.0.0" ,
73
74
"eslint-remote-tester" : " ^4.0.3" ,
74
75
"eslint-scope" : " ^8.0.1" ,
75
76
"espree" : " ^10.0.1" ,
79
80
"markdownlint-cli" : " ^0.43.0" ,
80
81
"npm-package-json-lint" : " ^8.0.0" ,
81
82
"npm-run-all2" : " ^7.0.1" ,
82
- "prettier" : " ^3.4.1 " ,
83
+ "prettier" : " ^3.6.2 " ,
83
84
"release-it" : " ^17.2.0" ,
84
85
"tsup" : " ^8.5.0" ,
85
86
"typescript" : " ^5.9.2" ,
Original file line number Diff line number Diff line change 1
- export default {
1
+ import { type Config } from 'prettier' ;
2
+
3
+ const config : Config = {
2
4
singleQuote : true ,
3
5
} ;
6
+
7
+ export default config ;
You can’t perform that action at this time.
0 commit comments