linter not using eslintConfig from package.json
See original GitHub issueI know in the docs it references using .eslintrc.json to override the linter settings but I’ve tried that as well as my preferred way of having those settings specified in package.json, but it isn’t working.
Here’s the config from package.json:
"eslintConfig": {
"extends": [
"eslint:recommended",
"google"
],
"rules": {
"no-console": 1,
"max-len": [
1,
100,
2
]
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true
},
"sourceType": "module"
},
"env": {
"es6": true,
"amd": true,
"node": true
},
"overrides": [
{
"files": [
"*test.js"
],
"rules": {
"no-undef": "off"
}
}
]
}
and my devDeps:
"devDependencies": {
"serverless-plugin-aws-alerts": "^1.4.0",
"serverless-plugin-ifelse": "^1.0.4",
"eslint-config-google": "^0.13.0",
"serverless-bundle": "^1.2.2"
}
From serverless.yml, I have this under “custom”:
bundle:
sourcemaps: true
caching: true
stats: false
linting: true
When trying to run sls invoke local for a function, the bundler runs, but then the linter is throwing, despite the rules overrides in eslintConfig:
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
eslint is not using local config · Issue #636
I have eslint installed globally and locally. However, the vscode plugin is not respecting the local configuration files.
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >How to configure package.json to run eslint script
I have setup eslint using tern in my eclipse oxygen. It is linting all the files, I have to set it up to...
Read more >User Guide | eslint-plugin-vue
Use Package Control to install SublimeLinter and its ESLint extension SublimeLinter-eslint. In the menu go to Preferences > Package Settings > ...
Read more >VS Code ESLint extension - Visual Studio Marketplace
json --ignore-path C:/mydirectory/.eslintignore ." } eslint.packageManager : controls the package manager to be used to resolve the ESLint library. This has ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tested this a bit more. The caching issue is strictly for ESLint. We could disable the cache and bugs like this won’t happen. https://github.com/AnomalyInnovations/serverless-bundle/blob/master/src/webpack.config.js#L65
Thoughts?
Yeah I see what you mean. It doesn’t happen often but it would be good if we could detect a change and clear the cache somehow.
I’m going to leave this issue open, hopefully somebody can chime in with some ideas.