File tree Expand file tree Collapse file tree 3 files changed +772
-13
lines changed Expand file tree Collapse file tree 3 files changed +772
-13
lines changed Original file line number Diff line number Diff line change 11import js from "@eslint/js" ;
22import globals from "globals" ;
33import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended" ;
4- import importPlugin from 'eslint-plugin-import' ;
4+ import importPlugin from "eslint-plugin-import" ;
5+ import tseslint from "typescript-eslint" ;
56
67export default [
78 js . configs . recommended ,
@@ -15,19 +16,29 @@ export default [
1516 ...globals . browser ,
1617 ...globals . node ,
1718 ...globals . mocha ,
18- }
19+ } ,
20+ parserOptions : {
21+ projectService : true ,
22+ tsconfigRootDir : import . meta. dirname ,
23+ } ,
1924 } ,
2025 rules : {
2126 "eol-last" : "error" ,
2227 "import/extensions" : [ "error" , "always" ] ,
23- ' import/no-unresolved' : 0 , // https://github.com/import-js/eslint-plugin-import/issues/3082
28+ " import/no-unresolved" : 0 , // https://github.com/import-js/eslint-plugin-import/issues/3082
2429 "no-console" : "error" ,
25- "no-constant-condition" : [ "error" , { " checkLoops" : false } ] ,
30+ "no-constant-condition" : [ "error" , { checkLoops : false } ] ,
2631 "no-eval" : "error" ,
2732 "no-implied-eval" : "error" ,
2833 "no-trailing-spaces" : "error" ,
2934 "prefer-const" : "error" ,
30- " semi" : "error"
35+ semi : "error" ,
3136 } ,
3237 } ,
38+ ...tseslint . configs . recommendedTypeChecked . map ( config => {
39+ return {
40+ files : [ "lib/**" ] ,
41+ ...config
42+ }
43+ } )
3344] ;
You can’t perform that action at this time.
0 commit comments