Skip to content

Commit

Permalink
Merge pull request #47 from samply/feature/add-linting
Browse files Browse the repository at this point in the history
Feature/add linting
  • Loading branch information
MatsJohansen87 authored Feb 7, 2024
2 parents 480d668 + 63e0df4 commit fa8169c
Show file tree
Hide file tree
Showing 56 changed files with 5,311 additions and 2,939 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
plugins: ['@typescript-eslint/eslint-plugin', 'eslint-plugin-tsdoc', 'jsdoc'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'plugin:svelte/prettier',
'eslint-config-prettier',
'prettier',
"plugin:jsdoc/recommended-typescript-error",
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
extraFileExtensions: ['.svelte'],
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
}
}
],
settings: {
'svelte/typescript': import('typescript'),
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'svelte/no-at-html-tags': 'off',
'jsdoc/check-syntax': 2,
"jsdoc/check-param-names": 2,


},
ignorePatterns: ['**/dist/**'],
};
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tabWidth": 4,
"plugins": [
"prettier-plugin-svelte"
],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
Loading

0 comments on commit fa8169c

Please sign in to comment.