Редактор - VS Code
Плагин Eslint установлен
Все зависимости есть и сам eslint работает, но только через консоль (npx eslint fileName), почему он не хочет подсвечивать ошибки?
Настройки плагина Eslint
{
"eslint.enable": true,
"workbench.colorTheme": "Visual Studio Dark",
"files.autoSave": "onFocusChange",
"editor.autoClosingBrackets": "always",
"workbench.startupEditor": "none",
"terminal.explorerKind": "external",
"workbench.iconTheme": "vscode-icons",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"html.format.contentUnformatted": "",
"window.zoomLevel": 1,
"[less]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"redhat.telemetry.enabled": true,
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"json.format.enable": false,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.editorAssociations": {
"*.docx": "default"
},
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"eslint.workingDirectories": ["./src", "./project", "./", "./my-app"],
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"prettier.jsxSingleQuote": true,
"prettier.singleAttributePerLine": true,
"prettier.singleQuote": true,
"eslint.format.enable": true,
"typescript.preferences.quoteStyle": "single",
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
}
.eslintrc.yml
parserOptions:
ecmaVersion: latest
sourceType: 'module'
env:
es2017: true
browser: true
extends: 'htmlacademy/vanilla'
package.json
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"eslint-config-htmlacademy": "^8.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"stylelint-config-htmlacademy": "^1.1.2",
"web-vitals": "^2.1.4",
"eslint": "^8.27.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {}
}