1- // @ts -check
21import cspellPlugin from '@cspell/eslint-plugin' ;
32import eslint from '@eslint/js' ;
43// @ts -expect-error eslint-plugin-next doesn't come with TypeScript definitions
54import nextPlugin from '@next/eslint-plugin-next' ;
5+ import stylistic from '@stylistic/eslint-plugin' ;
66import eslintConfigPrettier from 'eslint-config-prettier' ;
77import react from 'eslint-plugin-react' ;
88import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort' ;
@@ -22,6 +22,7 @@ export default tsEslint.config(
2222 {
2323 plugins : {
2424 '@cspell' : cspellPlugin ,
25+ '@stylistic' : stylistic ,
2526 'simple-import-sort' : simpleImportSortPlugin ,
2627 '@typescript-eslint' : tsEslint . plugin ,
2728 react,
@@ -30,7 +31,12 @@ export default tsEslint.config(
3031 } ,
3132 {
3233 // config with just ignores is the replacement for `.eslintignore`
33- ignores : [ '**/node_modules/**' , '**/public/**' , '**/.next/**' ] ,
34+ ignores : [
35+ '**/node_modules/**' ,
36+ '**/public/**' ,
37+ '**/.next/**' ,
38+ '.github/scripts/**' ,
39+ ] ,
3440 } ,
3541
3642 // extends ...
@@ -66,6 +72,18 @@ export default tsEslint.config(
6672 } ,
6773 } ,
6874 ] ,
75+ // stylistic
76+ '@stylistic/padding-line-between-statements' : [
77+ 'error' ,
78+ { blankLine : 'always' , prev : '*' , next : 'return' } ,
79+ { blankLine : 'always' , prev : 'directive' , next : '*' } ,
80+ { blankLine : 'any' , prev : 'directive' , next : 'directive' } ,
81+ {
82+ blankLine : 'always' ,
83+ prev : '*' ,
84+ next : [ 'enum' , 'interface' , 'type' ] ,
85+ } ,
86+ ] ,
6987 'arrow-body-style' : [ 'error' , 'as-needed' ] ,
7088 'no-empty-pattern' : 'warn' ,
7189 'no-console' : [ 'error' , { allow : [ 'warn' , 'error' , 'info' ] } ] ,
0 commit comments