Skip to content

Instantly share code, notes, and snippets.

@armchair-traveller
Last active January 2, 2024 02:30
Show Gist options
  • Save armchair-traveller/b43ff2008f9af83c14eb95732f91a949 to your computer and use it in GitHub Desktop.
Save armchair-traveller/b43ff2008f9af83c14eb95732f91a949 to your computer and use it in GitHub Desktop.
ESLint SvelteKit
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:svelte/recommended',
'prettier',
'plugin:unicorn/recommended',
'plugin:sonar/recommended',
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte'],
},
env: {
browser: true,
es2017: true,
node: true,
},
rules: {
'no-empty': ['warn', { allowEmptyCatch: true }],
'no-unused-vars': 'off',
'sonar/sonar-no-unused-vars': 'off',
'unicorn/filename-case': 'off',
'unicorn/prefer-dom-node-text-content': 'off',
'unicorn/prefer-string-replace-all': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/no-await-expression-member': 'off',
'sonar/no-labels': 'off',
'unicorn/catch-error-name': 'off',
'unicorn/prefer-number-properties': 'off',
'unicorn/prefer-optional-catch-binding': 'off',
'node/no-unpublished-import': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-null': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/explicit-length-check': 'off',
'sonar/unused-import': 'off',
'unicorn/no-array-reduce': 'off',
'sonar/for-in': 'off',
'node/no-missing-import': 'off',
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment