File tree Expand file tree Collapse file tree 3 files changed +34
-7
lines changed
Expand file tree Collapse file tree 3 files changed +34
-7
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,24 @@ export default tseslint.config(
155155 },
156156);
157157```
158+
159+ For legacy, ` .eslintrc.json `
160+
161+ ``` json
162+ {
163+ "extends" : [
164+ " eslint:recommended" ,
165+ " plugin:eslint-plugin-explicit-exceptions/recommended-type-checked-legacy"
166+ ],
167+ "parser" : " @typescript-eslint/parser" ,
168+ "plugins" : [" @typescript-eslint" ],
169+ "parserOptions" : {
170+ "projectService" : true
171+ },
172+ "root" : true
173+ }
174+ ```
175+
158176Check out [ ` typescript-eslint ` ] ( https://typescript-eslint.io/getting-started/ ) for more information if you having an issue with configuring.
159177
160178## License
Original file line number Diff line number Diff line change 11"use strict" ;
22
3- const path = require ( "path" ) ;
43const tseslint = require ( "typescript-eslint" ) ;
54const eslintPlugin = require ( "../src/plugin" ) ;
65
Original file line number Diff line number Diff line change @@ -14,16 +14,26 @@ const plugin = {
1414 } ,
1515} ;
1616
17+ const rules = /** @type {const } */ ( {
18+ 'explicit-exceptions/no-undocumented-throws' : 'error' ,
19+ 'explicit-exceptions/no-implicit-propagation' : 'error' ,
20+ 'explicit-exceptions/no-unhandled-rejection' : 'error' ,
21+ 'explicit-exceptions/check-throws-tag-type' : 'error' ,
22+ } ) ;
23+
1724const recommendedTypeChecked = /** @type {const } */ ( {
1825 plugins : {
1926 'explicit-exceptions' : plugin ,
2027 } ,
21- rules : {
22- 'explicit-exceptions/no-undocumented-throws' : 'error' ,
23- 'explicit-exceptions/no-implicit-propagation' : 'error' ,
24- 'explicit-exceptions/no-unhandled-rejection' : 'error' ,
25- 'explicit-exceptions/check-throws-tag-type' : 'error' ,
26- }
28+ rules,
29+ } ) ;
30+
31+ // Legacy config for backwards compatibility
32+ Object . assign ( plugin . configs , {
33+ 'recommended-type-checked-legacy' : {
34+ plugins : [ 'explicit-exceptions' ] ,
35+ rules,
36+ } ,
2737} ) ;
2838
2939module . exports = plugin ;
You can’t perform that action at this time.
0 commit comments