Last active
July 13, 2020 12:24
-
-
Save Gennnji/f831dfdc4d858bfccf7ac09f4e4295c4 to your computer and use it in GitHub Desktop.
Eslint config for Svelte example
This file contains 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
module.exports = { | |
parserOptions: { | |
ecmaVersion: 2019, | |
sourceType: 'module' | |
}, | |
env: { | |
es6: true, | |
browser: true | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:import/errors', | |
'plugin:import/warnings', | |
], | |
overrides: [ | |
{ | |
files: [ '*.svelte' ], | |
plugins: [ 'svelte3' ], | |
processor: 'svelte3/svelte3', | |
}, | |
Object.assign( | |
{ | |
files: [ '**/*.spec.js' ], | |
env: { jest: true }, | |
plugins: [ 'jest' ], | |
}, | |
require('eslint-plugin-jest').configs.recommended | |
) | |
], | |
rules: { | |
// ... | |
}, | |
settings: { | |
'svelte3/ignore-styles': attributes => attributes.lang && attributes.lang.includes('scss') | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment