This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +29
-19
lines changed Expand file tree Collapse file tree 5 files changed +29
-19
lines changed Original file line number Diff line number Diff line change 1
1
// @ts -check
2
- const { defineConfig } = require ( './src ' ) ;
2
+ const { defineConfig } = require ( '.' ) ;
3
3
const { readGitignoreFiles } = require ( 'eslint-gitignore' ) ;
4
4
5
5
module . exports = defineConfig ( {
6
6
ignorePatterns : [
7
7
...readGitignoreFiles ( ) ,
8
+ 'src/index.cjs' ,
8
9
'src/index.js' ,
9
- 'src/index.mjs' ,
10
- '.eslintrc.js' , // Skip self linting
10
+ '.eslintrc.cjs' , // Skip self linting
11
11
] ,
12
12
root : true ,
13
13
env : {
Original file line number Diff line number Diff line change 2
2
"name" : " eslint-define-config" ,
3
3
"version" : " 1.20.0" ,
4
4
"description" : " Provide a defineConfig function for .eslintrc.js files" ,
5
- "main" : " src/index.js" ,
6
- "module" : " src/index.mjs" ,
7
5
"scripts" : {
8
6
"clean" : " rimraf .eslintcache dist pnpm-lock.yaml node_modules" ,
9
7
"check" : " tsc" ,
15
13
"prepublishOnly" : " pnpm run clean && pnpm install && pnpm run check" ,
16
14
"generate:rules" : " tsx ./scripts/generate-rule-files/cli.ts"
17
15
},
16
+ "type" : " module" ,
17
+ "main" : " src/index.cjs" ,
18
+ "module" : " src/index.js" ,
19
+ "types" : " src/index.d.ts" ,
20
+ "exports" : {
21
+ "." : {
22
+ "types" : " ./src/index.d.ts" ,
23
+ "import" : " ./src/index.js" ,
24
+ "require" : " ./src/index.cjs" ,
25
+ "default" : " ./src/index.js"
26
+ }
27
+ },
18
28
"keywords" : [
19
29
" config" ,
20
30
" configuration" ,
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ exports . __esModule = true ;
4
+ exports . defineConfig = void 0 ;
5
+ exports . defineFlatConfig = void 0 ;
6
+
7
+ exports . defineConfig = ( config ) => config ;
8
+ exports . defineFlatConfig = ( config ) => config ;
Original file line number Diff line number Diff line change 1
- 'use strict' ;
1
+ export function defineConfig ( config ) {
2
+ return config ;
3
+ }
2
4
3
- exports . __esModule = true ;
4
- exports . defineConfig = void 0 ;
5
- exports . defineFlatConfig = void 0 ;
6
-
7
- exports . defineConfig = ( config ) => config ;
8
- exports . defineFlatConfig = ( config ) => config ;
5
+ export function defineFlatConfig ( config ) {
6
+ return config ;
7
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments