Last active
February 16, 2020 06:31
-
-
Save 5310/da414c11e8e4c3df87d5b3639b007a05 to your computer and use it in GitHub Desktop.
ESLint config #dotfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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