1- import { join } from 'node:path' ;
2- import { includeIgnoreFile } from '@eslint/compat' ;
3- import eslintPluginJs from '@eslint/js' ;
4- import importPlugin from 'eslint-plugin-import' ;
5- import jestPlugin from 'eslint-plugin-jest' ;
6- import jsdocPlugin from 'eslint-plugin-jsdoc' ;
7- import nodePlugin from 'eslint-plugin-n' ;
8- import prettierPlugin from 'eslint-plugin-prettier/recommended' ;
1+ import { node , jest } from '@cdcabrera/eslint-config-toolkit' ;
92
103export default [
11- includeIgnoreFile ( join ( process . cwd ( ) , '.gitignore' ) ) ,
12- jestPlugin . configs [ 'flat/recommended' ] ,
13- jsdocPlugin . configs [ 'flat/recommended' ] ,
14- nodePlugin . configs [ 'flat/recommended' ] ,
15- importPlugin . flatConfigs . recommended ,
16- eslintPluginJs . configs . recommended ,
17- prettierPlugin ,
4+ ...node ,
5+ ...jest ,
186 {
19- ignores : [ 'src/__fixtures__/**/*' ] ,
207 languageOptions : {
218 globals : {
229 cleanConfigurationPaths : 'readonly' ,
@@ -26,67 +13,11 @@ export default [
2613 removeFixture : 'readonly' ,
2714 setMockResourceFunctions : 'readonly' ,
2815 tempFixturePath : 'readonly'
29- } ,
30- ecmaVersion : 2022
16+ }
3117 } ,
3218 rules : {
33- 'arrow-parens' : [ 'error' , 'as-needed' ] ,
34- 'comma-dangle' : 0 ,
35- 'consistent-return' : 1 ,
36- 'jsdoc/no-undefined-types' : 2 ,
37- 'jsdoc/no-defaults' : 0 ,
38- 'jsdoc/require-jsdoc' : 2 ,
39- 'jsdoc/require-param' : 2 ,
40- 'jsdoc/require-param-description' : 0 ,
41- 'jsdoc/require-param-name' : 2 ,
42- 'jsdoc/require-param-type' : 2 ,
43- 'jsdoc/require-property' : 2 ,
44- 'jsdoc/require-property-description' : 0 ,
45- 'jsdoc/require-property-name' : 2 ,
46- 'jsdoc/require-property-type' : 2 ,
47- 'jsdoc/require-returns' : 2 ,
48- 'jsdoc/require-returns-description' : 0 ,
49- 'jsdoc/require-returns-type' : 2 ,
50- 'jsdoc/tag-lines' : [
51- 'warn' ,
52- 'always' ,
53- {
54- count : 0 ,
55- applyToEndTag : false ,
56- startLines : 1
57- }
58- ] ,
59- 'max-len' : [
60- 'error' ,
61- {
62- code : 240 ,
63- ignoreUrls : true
64- }
65- ] ,
66- 'n/no-unsupported-features/es-syntax' : 1 ,
67- 'n/shebang' : 0 ,
68- 'n/no-unpublished-bin' : 0 ,
69- 'no-console' : 0 ,
70- 'no-debugger' : 1 ,
71- 'no-plusplus' : 0 ,
72- 'no-unused-vars' : [
73- 'error' ,
74- {
75- caughtErrors : 'none'
76- }
77- ] ,
78- 'no-unsafe-optional-chaining' : 1 ,
79- 'no-var' : 2 ,
80- 'padded-blocks' : 0 ,
81- 'prettier/prettier' : [
82- 'error' ,
83- {
84- arrowParens : 'avoid' ,
85- singleQuote : true ,
86- trailingComma : 'none' ,
87- printWidth : 120
88- }
89- ]
19+ '@stylistic/quotes' : [ 2 , 'single' , { avoidEscape : true , allowTemplateLiterals : true } ] ,
20+ 'import/no-dynamic-require' : 0
9021 }
9122 }
9223] ;
0 commit comments