@lvce-editor/eslint-plugin-tsconfig 4.8.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import json from '@eslint/json';
|
|
2
2
|
|
|
3
|
-
const create$8 = (context, name) => {
|
|
3
|
+
const create$8 = (context, name, shouldBeValue = true) => {
|
|
4
4
|
return {
|
|
5
5
|
Member(node) {
|
|
6
6
|
if (node.name.type === 'String' && node.name.value === 'compilerOptions' && node.value.type === 'Object') {
|
|
7
7
|
const members = node.value.members;
|
|
8
8
|
for (const member of members) {
|
|
9
9
|
if (member.name.type === 'String' && member.name.value === name) {
|
|
10
|
-
if (member.value.value ===
|
|
10
|
+
if (member.value.value === shouldBeValue) {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
|
-
if (member.value.value ===
|
|
13
|
+
if (member.value.value === !shouldBeValue) {
|
|
14
14
|
context.report({
|
|
15
15
|
loc: member.name.loc,
|
|
16
16
|
messageId: name
|
|
@@ -200,6 +200,7 @@ const plugin = {
|
|
|
200
200
|
const recommended = [{
|
|
201
201
|
files: ['**/tsconfig.json'],
|
|
202
202
|
plugins: {
|
|
203
|
+
// @ts-ignore
|
|
203
204
|
json,
|
|
204
205
|
tsconfig: plugin
|
|
205
206
|
},
|
|
@@ -215,7 +216,8 @@ const recommended = [{
|
|
|
215
216
|
'tsconfig/allow-importing-ts-extensions': 'error',
|
|
216
217
|
'tsconfig/no-implicit-any': 'error',
|
|
217
218
|
'tsconfig/assume-changes-only-affect-direct-dependenices': 'error',
|
|
218
|
-
'tsconfig/exact-optional-property-types': 'error'
|
|
219
|
+
'tsconfig/exact-optional-property-types': 'error',
|
|
220
|
+
'tsconfig/dont-skip-libcheck': 'error'
|
|
219
221
|
}
|
|
220
222
|
}];
|
|
221
223
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/eslint-plugin-tsconfig",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"description": "",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@eslint/json": "0.
|
|
14
|
+
"@eslint/json": "1.0.0"
|
|
15
15
|
}
|
|
16
16
|
}
|