Skip to content

Instantly share code, notes, and snippets.

@Gennnji
Last active July 13, 2020 12:24
Show Gist options
  • Save Gennnji/f831dfdc4d858bfccf7ac09f4e4295c4 to your computer and use it in GitHub Desktop.
Save Gennnji/f831dfdc4d858bfccf7ac09f4e4295c4 to your computer and use it in GitHub Desktop.
Eslint config for Svelte example
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