diff --git a/.eslintignore b/.eslintignore index 6419acd..8fffafc 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,3 @@ -/node_modules -/dist -/packages \ No newline at end of file +node_modules +dist +packages \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index ae76208..d7e3fdf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,6 +11,7 @@ "extends": [ "eslint:recommended", "plugin:react/recommended", + "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier" ], @@ -23,7 +24,6 @@ "sourceType": "module" }, "plugins": [ - "import", "react", "@typescript-eslint", "prettier" @@ -31,19 +31,7 @@ "rules": { "semi": ["error", "always"], "quotes": ["error", "single"], - "import/extensions": [ - "error", - "ignorePackages", - { - "js": "never", - "jsx": "never", - "ts": "never", - "tsx": "never" - } - ], - "import/no-dynamic-require": 0, "global-require": 0, - "import/prefer-default-export": 0, "no-underscore-dangle": 0, "no-await-in-loop": 0, "no-restricted-syntax": 0, @@ -56,7 +44,7 @@ "singleQuote": true, "printWidth": 80, "tabWidth": 2, - "endOfLine": "lf", + "endOfLine": "auto", "arrowParens": "always" } ] diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 6a9a3ac..1d1e951 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -25,6 +25,8 @@ stages: displayName: 'Install Node CLI for Azure DevOps' - script: npm install displayName: 'Install Dependencies' + - script: npm run lint + displayName: 'Run ESLint' - script: | npm run package -- --override {\"version\": \"$(MajorVersion).$(MinorVersion).$(PatchVersion)\"} displayName: 'Build & Package Extension' diff --git a/package.json b/package.json index fad9d79..4a33e3a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "build": "webpack", "package": "npm run build && tfx extension create --manifests vss-extension.json --output-path ./packages/", - "linter": "eslint src --fix --cache" + "lint": "eslint src --cache", + "lintfix": "eslint src --fix --cache" }, "keywords": [], "author": "Gareth Emslie", @@ -32,7 +33,6 @@ "prettier": "^2.4.1", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.24.2", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.26.0" }