Skip to content

Instantly share code, notes, and snippets.

@5310
Last active February 16, 2020 06:31
Show Gist options
  • Select an option

  • Save 5310/da414c11e8e4c3df87d5b3639b007a05 to your computer and use it in GitHub Desktop.

Select an option

Save 5310/da414c11e8e4c3df87d5b3639b007a05 to your computer and use it in GitHub Desktop.
ESLint config #dotfile
// NOTE: Because common sense is in short supply,
// and now that ESLint v6 can't resolve external configs to extend
// (but can be persuaded to load plugins; not configs),
// the following code is necessary for my setup.
// Credit: https://github.com/eslint/eslint/issues/11914#issuecomment-569108633
const Module = require('module')
const ModuleFindPath = Module._findPath
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain)
if (!r) {
return require.resolve(`/usr/lib/node_modules/${request}`)
}
return r
}
module.exports = {
parser: 'babel-eslint',
extends: 'eslint-config-standard',
env: {
browser: true,
},
plugins: [
'html',
],
rules: {
'comma-dangle': ['error', 'only-multiline'],
'no-unused-vars': 'warn',
'no-labels': 'off',
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment