Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,28 @@ module.exports = {
plugins: [
'@typescript-eslint',
'no-only-tests',
'github'
'github',
'import'
],
extends: [
'eslint:all',
'plugin:@typescript-eslint/all'
],
rules: {
//fail if a runtime source file imports a package that isn't listed in `dependencies`.
//this catches the case where a package used at runtime is only present in `devDependencies`,
//which gets stripped when the extension is packaged into a .vsix (see the dayjs regression).
//devDependencies are only permitted in the test/tooling globs listed below.
'import/no-extraneous-dependencies': ['error', {
devDependencies: [
'scripts/**',
'benchmarks/**',
'.eslintrc.js',
'**/*.config.*'
],
optionalDependencies: false,
peerDependencies: true
}],
'@typescript-eslint/parameter-properties': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
Expand Down Expand Up @@ -202,6 +217,8 @@ module.exports = {
}, {
files: ['*.spec.ts'],
rules: {
//spec files only run with devDependencies installed, so extraneous-dependency checks don't apply
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"iconv-lite": "0.4.24",
"jszip": "^3.10.1",
"just-throttle": "^4.0.1",
"lodash": "^4.17.21",
"md5": "^2.3.0",
"minimatch": "^3.1.2",
"node-cache": "^4.2.0",
Expand Down Expand Up @@ -122,8 +123,8 @@
"deferred": "^0.7.11",
"eslint": "^8.10.0",
"eslint-plugin-github": "^4.3.5",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"lodash": "^4.17.21",
"mocha": "^10.8.2",
"node-notifier": "^10.0.1",
"nyc": "^15.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/viewProviders/BaseWebviewViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export abstract class BaseWebviewViewProvider implements vscode.WebviewViewProvi
try {
let watcher;
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports
// eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies
watcher = require('@parcel/watcher');
} catch (e) {
// Doing nothing if watcher does not exist
Expand Down
Loading