1+ import eslint from '@eslint/js' ;
2+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' ;
3+ import tseslint from 'typescript-eslint' ;
4+
5+ import licenseHeader from "eslint-plugin-license-header" ;
6+
7+ export default tseslint . config (
8+ {
9+ extends : [
10+ eslint . configs . recommended ,
11+ ...tseslint . configs . recommended ,
12+ eslintPluginPrettierRecommended ,
13+ ] ,
14+ languageOptions : {
15+ parserOptions : {
16+ projectService : true ,
17+ project : './tsconfig.json' ,
18+ tsconfigRootDir : import . meta. dirname ,
19+ } ,
20+ } ,
21+ plugins : {
22+ 'license-header' : licenseHeader
23+ } ,
24+ files : [ "src/**/*.ts" ] ,
25+ rules : {
26+ 'prettier/prettier' : 'error' ,
27+ 'linebreak-style' : [ 'error' , 'unix' ] ,
28+ '@typescript-eslint/no-explicit-any' : 'off' ,
29+ '@typescript-eslint/no-var-requires' : 'off' ,
30+ '@typescript-eslint/no-require-imports' : 'off' ,
31+ '@typescript-eslint/no-empty-object-type' : 'off' ,
32+ '@typescript-eslint/no-unused-vars' : [ 'error' , { caughtErrors : 'none' } ] ,
33+ 'prefer-const' : [ 'error' , { destructuring : 'all' } ] ,
34+ 'license-header/header' : [ 'error' , './resources/license-header.js' ] ,
35+ } ,
36+ } ,
37+ {
38+ files : [ 'src/**/*.test.ts' ] ,
39+ rules : {
40+ '@typescript-eslint/no-unused-expressions' : 'off' ,
41+ }
42+ } ,
43+ {
44+ ignores : [ 'out/**' , 'test-workspaces/**' , 'src/typings/**' , 'resources/**' , '*.js' , '*.mjs' , '.vscode-test/**' ] ,
45+ }
46+ ) ;
0 commit comments