File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 1
- /**
2
- * @author Toru Nagashima
3
- * See LICENSE file in root directory for full license.
4
- */
5
1
"use strict"
6
2
3
+ const { Linter } = require ( "eslint" )
4
+ const semver = require ( "semver" )
5
+
6
+ const isESLint71OrHigher = semver . gte ( Linter . version , "7.1.0" )
7
+
7
8
module . exports = {
8
9
overrides : [
9
10
{
@@ -71,7 +72,15 @@ module.exports = {
71
72
"@eslint-community/mysticatea/ts/no-inferrable-types" : "error" ,
72
73
"@eslint-community/mysticatea/ts/no-invalid-this" : "error" ,
73
74
"@eslint-community/mysticatea/ts/no-invalid-void-type" : "error" ,
74
- "@eslint-community/mysticatea/ts/no-loss-of-precision" : "error" ,
75
+ ...( isESLint71OrHigher
76
+ ? {
77
+ "@eslint-community/mysticatea/ts/no-loss-of-precision" :
78
+ "error" ,
79
+ }
80
+ : {
81
+ "@eslint-community/mysticatea/ts/no-loss-of-precision" :
82
+ "off" ,
83
+ } ) , // TODO: enable fully once we drop v7 support
75
84
"@eslint-community/mysticatea/ts/no-loop-func" : "error" ,
76
85
"@eslint-community/mysticatea/ts/no-meaningless-void-operator" :
77
86
"error" ,
@@ -162,7 +171,7 @@ module.exports = {
162
171
"error" ,
163
172
"@eslint-community/mysticatea/ts/triple-slash-reference" :
164
173
"error" ,
165
- // なんか誤検知が多い ...
174
+ // I get a lot of false positives ...
166
175
"@eslint-community/mysticatea/ts/unbound-method" : [
167
176
"off" ,
168
177
{ ignoreStatic : true } ,
Original file line number Diff line number Diff line change 50
50
"eslint-plugin-prettier" : " ~3.4.1" ,
51
51
"eslint-plugin-vue" : " ~8.7.1" ,
52
52
"prettier" : " ~2.7.1" ,
53
+ "semver" : " ^7.3.8" ,
53
54
"vue-eslint-parser" : " ^8.3.0"
54
55
},
55
56
"devDependencies" : {
56
- "@eslint/eslintrc" : " ^1.3.3" ,
57
57
"@eslint-community/eslint-plugin-mysticatea" : " file:." ,
58
+ "@eslint/eslintrc" : " ^1.3.3" ,
58
59
"eslint" : " ~8.27.0" ,
59
60
"globals" : " ^13.17.0" ,
60
61
"mocha" : " ^9.2.2" ,
You can’t perform that action at this time.
0 commit comments