generated from wanoo21/tailwind-astro-starting-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from eduardo-escoto/dev
Husky, prettier, eslint
- Loading branch information
Showing
9 changed files
with
8,334 additions
and
11,342 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
.eslintrc.cjs | ||
pnpm-lock.yaml | ||
package.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
env: { | ||
browser: true, | ||
amd: true, | ||
node: true, | ||
es6: true, | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:prettier/recommended', | ||
'plugin:astro/recommended', | ||
], | ||
overrides: [ | ||
{ | ||
// Define the configuration for `.astro` file. | ||
files: ['*.astro'], | ||
// Allows Astro components to be parsed. | ||
parser: 'astro-eslint-parser', | ||
// Parse the script in `.astro` as TypeScript by adding the following configuration. | ||
// It's the setting you need when using TypeScript. | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
extraFileExtensions: ['.astro'], | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'jsx-a11y/anchor-is-valid': [ | ||
'error', | ||
{ | ||
components: ['Link'], | ||
specialLink: ['hrefLeft', 'hrefRight'], | ||
aspects: ['invalidHref', 'preferButton'], | ||
}, | ||
], | ||
'@typescript-eslint/no-unused-vars': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
}, | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"*.{ts,tsx,js,md,mdx,css,yaml,astro,cjs,mjs,json}": ["prettier --write", "eslint"] | ||
} |
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
Oops, something went wrong.