1- import nx from '@nx/eslint-plugin' ;
1+ import eslint from '@eslint/js' ;
2+ import { globalIgnores } from 'eslint/config' ;
23import simpleImportSort from 'eslint-plugin-simple-import-sort' ;
3- import jsoncParser from 'jsonc -eslint-parser ' ;
4+ import tseslint from 'typescript -eslint' ;
45
56export default [
6- ... nx . configs [ 'flat/base' ] ,
7- ...nx . configs [ 'flat/typescript' ] ,
8- ... nx . configs [ 'flat/javascript' ] ,
7+ eslint . configs . recommended ,
8+ ...tseslint . configs . recommended ,
9+ globalIgnores ( [ 'website/' , 'templates/' ] ) ,
910 {
1011 files : [ '**/*.ts' , '**/*.tsx' , '**/*.js' , '**/*.jsx' ] ,
1112 rules : {
1213 '@typescript-eslint/consistent-type-imports' : 'error' ,
14+ '@typescript-eslint/no-explicit-any' : 'warn' ,
1315 '@typescript-eslint/no-unused-vars' : [
1416 'error' ,
1517 {
1618 argsIgnorePattern : '^_' ,
1719 caughtErrorsIgnorePattern : '^_' ,
1820 } ,
1921 ] ,
20- '@nx/enforce-module-boundaries' : [
21- 'error' ,
22- {
23- enforceBuildableLibDependency : true ,
24- allow : [ '^.*/eslint(\\.base)?\\.config\\.[cm]?js$' ] ,
25- depConstraints : [
26- {
27- sourceTag : '*' ,
28- onlyDependOnLibsWithTags : [ '*' ] ,
29- } ,
30- ] ,
31- } ,
32- ] ,
3322 } ,
3423 } ,
3524 {
@@ -48,31 +37,23 @@ export default [
4837 {
4938 files : [ '**/*.ts' , '**/*.tsx' , '**/*.js' , '**/*.jsx' ] ,
5039 // Override or add rules here
51- rules : { } ,
5240 } ,
5341 {
54- files : [ '**/*.test.ts' , '**/__tests__/**' ] ,
42+ files : [ 'scripts/**/*.mjs' ] ,
43+ // Override or add rules here
5544 rules : {
56- '@typescript-eslint/ no-empty-function ' : 'off' ,
45+ 'no-undef ' : 'off' ,
5746 } ,
5847 } ,
5948 {
60- ignores : [ '**/template/**/*.mjs' , '**/dist/**' , '**/__fixtures__/**' ] ,
61- } ,
62- {
63- files : [ '**/*.json' ] ,
49+ files : [ '**/*.test.ts' , '**/__tests__/**' , '**/metro.config.js' , '**/vite.e2e.config.js' ] ,
6450 rules : {
65- '@nx/dependency-checks' : [
66- 'warn' ,
67- {
68- ignoredFiles : [ '{projectRoot}/eslint.config.{js,cjs,mjs}' ] ,
69- // TODO: @nx /dependency-checks incorrectly reports unused dependencies
70- checkObsoleteDependencies : false ,
71- } ,
72- ] ,
73- } ,
74- languageOptions : {
75- parser : jsoncParser ,
51+ '@typescript-eslint/no-empty-function' : 'off' ,
52+ '@typescript-eslint/no-require-imports' : 'off' ,
53+ 'no-undef' : 'off' ,
7654 } ,
7755 } ,
56+ {
57+ ignores : [ '**/template/**/*.mjs' , '**/dist/**' , '**/__fixtures__/**' ] ,
58+ } ,
7859] ;
0 commit comments