Switch to shared ESLint config (#2916)
This commit is contained in:
Родитель
c353ffa8ba
Коммит
ac446dd2f2
38
.eslintrc.js
38
.eslintrc.js
|
@ -1,39 +1,3 @@
|
|||
module.exports = {
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"import"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"rules": {
|
||||
"no-unused-vars": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-inner-declarations": "off",
|
||||
"no-case-declarations": "off",
|
||||
"@typescript-eslint/prefer-regexp-exec": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{ "argsIgnorePattern": "^_" }
|
||||
],
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/unbound-method": "off",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
||||
"@typescript-eslint/restrict-template-expressions": "off",
|
||||
"@typescript-eslint/no-namespace": "off",
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/require-await": "off",
|
||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
||||
}
|
||||
"extends": "@microsoft/eslint-config-azuretools"
|
||||
};
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@azure/arm-resources": "^3.0.0",
|
||||
"@microsoft/eslint-config-azuretools": "^0.1.0",
|
||||
"@types/fs-extra": "^8.1.0",
|
||||
"@types/gulp": "^4.0.6",
|
||||
"@types/gulp-filter": "^3.0.33",
|
||||
|
@ -48,7 +49,6 @@
|
|||
"@types/xml2js": "^0.4.5",
|
||||
"@types/xregexp": "4.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
||||
"@typescript-eslint/parser": "^4.28.3",
|
||||
"copy-webpack-plugin": "^6.0.3",
|
||||
"eslint": "^7.19.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
|
@ -809,6 +809,20 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@microsoft/eslint-config-azuretools": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@microsoft/eslint-config-azuretools/-/eslint-config-azuretools-0.1.0.tgz",
|
||||
"integrity": "sha512-1H95Y6RzUxl96BHneJeLdf2zsJFTZA1Ho6O6lAhky/mfYRulXFOGzeWyffwNScWdWFkHxGSmec5XnkQhoHKy5A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/parser": "^4.28.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": ">=4",
|
||||
"eslint": ">=7",
|
||||
"eslint-plugin-import": ">=2"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
|
||||
|
@ -1296,14 +1310,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "4.28.3",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.28.3.tgz",
|
||||
"integrity": "sha512-ZyWEn34bJexn/JNYvLQab0Mo5e+qqQNhknxmc8azgNd4XqspVYR5oHq9O11fLwdZMRcj4by15ghSlIEq+H5ltQ==",
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.29.1.tgz",
|
||||
"integrity": "sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "4.28.3",
|
||||
"@typescript-eslint/types": "4.28.3",
|
||||
"@typescript-eslint/typescript-estree": "4.28.3",
|
||||
"@typescript-eslint/scope-manager": "4.29.1",
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"@typescript-eslint/typescript-estree": "4.29.1",
|
||||
"debug": "^4.3.1"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -1322,6 +1336,95 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz",
|
||||
"integrity": "sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"@typescript-eslint/visitor-keys": "4.29.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^8.10.0 || ^10.13.0 || >=11.10.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.1.tgz",
|
||||
"integrity": "sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^8.10.0 || ^10.13.0 || >=11.10.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz",
|
||||
"integrity": "sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"@typescript-eslint/visitor-keys": "4.29.1",
|
||||
"debug": "^4.3.1",
|
||||
"globby": "^11.0.3",
|
||||
"is-glob": "^4.0.1",
|
||||
"semver": "^7.3.5",
|
||||
"tsutils": "^3.21.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10.12.0 || >=12.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz",
|
||||
"integrity": "sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"eslint-visitor-keys": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^8.10.0 || ^10.13.0 || >=11.10.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "4.28.3",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.28.3.tgz",
|
||||
|
@ -13832,6 +13935,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"@microsoft/eslint-config-azuretools": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@microsoft/eslint-config-azuretools/-/eslint-config-azuretools-0.1.0.tgz",
|
||||
"integrity": "sha512-1H95Y6RzUxl96BHneJeLdf2zsJFTZA1Ho6O6lAhky/mfYRulXFOGzeWyffwNScWdWFkHxGSmec5XnkQhoHKy5A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/parser": "^4.28.5"
|
||||
}
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
|
||||
|
@ -14255,15 +14367,67 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "4.28.3",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.28.3.tgz",
|
||||
"integrity": "sha512-ZyWEn34bJexn/JNYvLQab0Mo5e+qqQNhknxmc8azgNd4XqspVYR5oHq9O11fLwdZMRcj4by15ghSlIEq+H5ltQ==",
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.29.1.tgz",
|
||||
"integrity": "sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "4.28.3",
|
||||
"@typescript-eslint/types": "4.28.3",
|
||||
"@typescript-eslint/typescript-estree": "4.28.3",
|
||||
"@typescript-eslint/scope-manager": "4.29.1",
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"@typescript-eslint/typescript-estree": "4.29.1",
|
||||
"debug": "^4.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz",
|
||||
"integrity": "sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"@typescript-eslint/visitor-keys": "4.29.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.1.tgz",
|
||||
"integrity": "sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz",
|
||||
"integrity": "sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"@typescript-eslint/visitor-keys": "4.29.1",
|
||||
"debug": "^4.3.1",
|
||||
"globby": "^11.0.3",
|
||||
"is-glob": "^4.0.1",
|
||||
"semver": "^7.3.5",
|
||||
"tsutils": "^3.21.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "4.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz",
|
||||
"integrity": "sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.29.1",
|
||||
"eslint-visitor-keys": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
|
|
|
@ -1074,6 +1074,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@azure/arm-resources": "^3.0.0",
|
||||
"@microsoft/eslint-config-azuretools": "^0.1.0",
|
||||
"@types/fs-extra": "^8.1.0",
|
||||
"@types/gulp": "^4.0.6",
|
||||
"@types/gulp-filter": "^3.0.33",
|
||||
|
@ -1087,7 +1088,6 @@
|
|||
"@types/xml2js": "^0.4.5",
|
||||
"@types/xregexp": "4.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
||||
"@typescript-eslint/parser": "^4.28.3",
|
||||
"copy-webpack-plugin": "^6.0.3",
|
||||
"eslint": "^7.19.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
module.exports = {
|
||||
"extends": [
|
||||
"../.eslintrc.js"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/require-await": "off"
|
||||
}
|
||||
"@microsoft/eslint-config-azuretools",
|
||||
"@microsoft/eslint-config-azuretools/test"
|
||||
]
|
||||
};
|
||||
|
|
|
@ -8,6 +8,7 @@ import { Extension, extensions } from "vscode";
|
|||
import { runWithInputs } from 'vscode-azureextensiondev';
|
||||
import { AzureExtensionApiProvider } from "vscode-azureextensionui/api";
|
||||
import { nonNullValue, ProjectLanguage, registerOnActionStartHandler } from '../extension.bundle';
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { AzureFunctionsExtensionApi } from '../src/vscode-azurefunctions.api';
|
||||
import { testFolderPath } from './global.test';
|
||||
import { getJavaScriptValidateOptions, IValidateProjectOptions, validateProject } from './project/validateProject';
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
import * as path from 'path';
|
||||
import { TestActionContext, TestInput } from 'vscode-azureextensiondev';
|
||||
import { createNewProjectInternal, getRandomHexString, hiddenStacksSetting, ProjectLanguage } from '../../extension.bundle';
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import * as api from '../../src/vscode-azurefunctions.api';
|
||||
import { testFolderPath } from '../global.test';
|
||||
import { runWithFuncSetting } from '../runWithSetting';
|
||||
|
|
Загрузка…
Ссылка в новой задаче