File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1- import js from "@eslint/js" ;
2- import prettierPlugin from "eslint-plugin-prettier" ;
3- import prettierConfig from "eslint-config-prettier" ;
1+ import js from '@eslint/js' ;
2+ import globals from 'globals' ;
3+ import prettierPlugin from 'eslint-plugin-prettier' ;
4+ import prettierConfig from 'eslint-config-prettier' ;
45
56export default [
67 js . configs . recommended ,
@@ -10,17 +11,21 @@ export default [
1011 prettier : prettierPlugin ,
1112 } ,
1213 rules : {
13- " prettier/prettier" : " error" ,
14+ ' prettier/prettier' : ' error' ,
1415 } ,
1516 } ,
1617
1718 {
18- files : [ " **/*.js" , " **/*.mjs" ] , // 只对 JS 和 MJS 文件应用这些规则
19+ files : [ ' **/*.js' , ' **/*.mjs' ] , // 只对 JS 和 MJS 文件应用这些规则
1920 languageOptions : {
2021 ecmaVersion : 2017 ,
21- sourceType : "module" ,
22+ sourceType : 'module' ,
23+ globals : {
24+ ...globals . es2017 ,
25+ ...globals . node ,
26+ } ,
2227 } ,
2328 } ,
2429
2530 prettierConfig ,
26- ] ;
31+ ] ;
You can’t perform that action at this time.
0 commit comments