1+ import js from "@eslint/js" ;
2+ import importPlugin from "eslint-plugin-import" ;
3+ import eslintConfigPrettier from "eslint-config-prettier" ;
4+ import globals from "globals" ;
5+ import { createRequire } from "module" ;
6+
7+ const require = createRequire ( import . meta. url ) ;
8+ const chalkPath = require . resolve ( "chalk" ) ;
9+ const chalkCjs = require ( "chalk" ) ;
10+
11+ if ( ! chalkCjs . underline && chalkCjs . default ) {
12+ require . cache [ chalkPath ] . exports = chalkCjs . default ;
13+ }
14+
15+ const recommended = js . configs . recommended ;
16+ const importRecommended = importPlugin . configs . recommended ;
17+
18+ export default [
19+ {
20+ name : "noisytransfer/ignores" ,
21+ ignores : [ "dist/**" ] ,
22+ } ,
23+ {
24+ name : "noisytransfer/base" ,
25+ languageOptions : {
26+ ...( recommended . languageOptions ?? { } ) ,
27+ ...( importRecommended . languageOptions ?? { } ) ,
28+ ecmaVersion : 2023 ,
29+ sourceType : "module" ,
30+ globals : {
31+ ...globals . es2023 ,
32+ ...globals . node ,
33+ } ,
34+ } ,
35+ linterOptions : {
36+ ...( recommended . linterOptions ?? { } ) ,
37+ ...( importRecommended . linterOptions ?? { } ) ,
38+ } ,
39+ plugins : {
40+ import : importPlugin ,
41+ } ,
42+ settings : {
43+ ...( recommended . settings ?? { } ) ,
44+ ...( importRecommended . settings ?? { } ) ,
45+ } ,
46+ rules : {
47+ ...( recommended . rules ?? { } ) ,
48+ ...( importRecommended . rules ?? { } ) ,
49+ "no-console" : "off" ,
50+ "import/no-unresolved" : "off" ,
51+ } ,
52+ } ,
53+ eslintConfigPrettier ,
54+ ] ;
0 commit comments