eslint: eslint-disable-next-line [rule] doesn't work
About my environment
- ESLint Version: 4.15.0
- Node Version: 8.9.4
- npm Version: 5.6.0
I use babel-eslint parser
Configuration
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: ['plugin:vue/essential', 'airbnb-base'],
// required to lint *.vue files
plugins: [
'vue',
'html'
],
// check if imports actually resolve
settings: {
'import/resolver': {
webpack: {
config: 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['tests/unit/index.js']
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'import/prefer-default-export': 'off',
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
...
AwesomeIcon.register({
npm: {
width: 24,
height: 20,
paths: [
{
// eslint-disable-next-line
d: 'M0 7.334v8h6.666v1.332H12v-1.332h12v-8H0zm6.666 6.664H5.334v-4H3.999v4H1.335V8.667h5.331v5.331zm4 0v1.336H8.001V8.667h5.334v5.332h-2.669v-.001zm12.001 0h-1.33v-4h-1.336v4h-1.335v-4h-1.33v4h-2.671V8.667h8.002v5.331z',
},
{
d: 'M10.665 10H12v2.667h-1.335V10z',
},
],
},
});
...
npm run lint
What did you expect to happen? no warnings What actually happened? Please include the actual, raw output from ESLint. D:\projects~\Providers.vue 39:3 error Line 18 exceeds the maximum line length of 100 max-len
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Update dependencies Work around https://github.com/eslint/eslint/issues/9980 by disabling the `no-await-in-loop` rule for the entire test file. — committed to avajs/ava by novemberborn 6 years ago
That should no longer be the case in the latest version.
I’m not sure the original issue has been resolved, but I also couldn’t reproduce it.