Skip to content

Commit

Permalink
Merge pull request #59 from samply/doc/lint
Browse files Browse the repository at this point in the history
fix: linting should now work after commit
  • Loading branch information
patrickskowronekdkfz authored Mar 12, 2024
2 parents e9a0faf + 0e628de commit 3f00d8b
Show file tree
Hide file tree
Showing 7 changed files with 1,218 additions and 62 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.eslintrc.cjs
58 changes: 31 additions & 27 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
module.exports = {
plugins: ['@typescript-eslint/eslint-plugin', 'eslint-plugin-tsdoc', 'jsdoc'],
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",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended",
"plugin:svelte/prettier",
"eslint-config-prettier",
"prettier",
"plugin:jsdoc/recommended-typescript-error",
],
parser: '@typescript-eslint/parser',
parser: "@typescript-eslint/parser",
parserOptions: {
project: './tsconfig.json',
extraFileExtensions: ['.svelte'],
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
}
}
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
],
settings: {
'svelte/typescript': import('typescript'),
"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,


"@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/**'],
};
};
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit
7 changes: 7 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"body-max-line-length": [0, "always"],
"footer-max-line-length": [0, "always"],
},
};
11 changes: 11 additions & 0 deletions docs/LINTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Liniting

## Installing

npm install --dev

## runing

npm run lint

Note this will only lint staged files, so don't forget to add with git add
Loading

0 comments on commit 3f00d8b

Please sign in to comment.