mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-06 04:21:55 +00:00
chore: add eslint and prettier configurations
This commit is contained in:
5
.eslintignore
Normal file
5
.eslintignore
Normal file
@@ -0,0 +1,5 @@
|
||||
dist
|
||||
node_modules
|
||||
package-lock.json
|
||||
*.md
|
||||
*.min.js
|
||||
46
.eslintrc.js
Normal file
46
.eslintrc.js
Normal file
@@ -0,0 +1,46 @@
|
||||
const tsRules = {
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/no-empty-interface": "off"
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
node: true,
|
||||
browser: true,
|
||||
},
|
||||
extends: ['eslint:recommended', 'plugin:astro/recommended'],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
"no-unused-vars": "off"
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.astro'],
|
||||
parser: 'astro-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
extraFileExtensions: ['.astro'],
|
||||
},
|
||||
rules: {
|
||||
...tsRules
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.ts'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
extends: ['plugin:@typescript-eslint/recommended'],
|
||||
rules: {
|
||||
...tsRules
|
||||
},
|
||||
},
|
||||
{
|
||||
// Define the configuration for `<script>` tag.
|
||||
// Script in `<script>` is assigned a virtual file name with the `.js` extension.
|
||||
files: ['**/*.astro/*.js', '*.astro/*.js'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
},
|
||||
],
|
||||
};
|
||||
5
.prettierignore
Normal file
5
.prettierignore
Normal file
@@ -0,0 +1,5 @@
|
||||
dist
|
||||
node_modules
|
||||
package-lock.json
|
||||
*.md
|
||||
*.min.js
|
||||
11
.prettierrc
Normal file
11
.prettierrc
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"useTabs": true,
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.astro"],
|
||||
"options": {
|
||||
"parser": "astro"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
883
package-lock.json
generated
883
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -23,7 +23,9 @@
|
||||
"start": "astro dev --experimental-integrations",
|
||||
"build": "astro build --experimental-integrations",
|
||||
"preview": "astro preview --experimental-integrations",
|
||||
"host:local": "cd dist && ws --http2 --compress"
|
||||
"host:local": "cd dist && ws --http2 --compress",
|
||||
"format": "prettier -w . --cache --plugin-search-dir=.",
|
||||
"lint": "eslint . --ext .js,.ts,.astro"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/image": "^0.7.1",
|
||||
@@ -31,10 +33,14 @@
|
||||
"@remark-embedder/transformer-oembed": "^3.0.0",
|
||||
"@types/classnames": "^2.3.1",
|
||||
"@types/node": "^18.7.18",
|
||||
"@typescript-eslint/parser": "^4.33.0",
|
||||
"astro": "^1.2.8",
|
||||
"astro-icon": "^0.7.3",
|
||||
"classnames": "^2.3.2",
|
||||
"dayjs": "^1.11.5",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-astro": "^0.19.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"gatsby-remark-embedder": "^6.0.1",
|
||||
"gray-matter": "^4.0.3",
|
||||
"hast": "^1.0.0",
|
||||
@@ -44,6 +50,8 @@
|
||||
"hast-util-to-string": "^2.0.0",
|
||||
"image-size": "^1.0.2",
|
||||
"junk": "^4.0.0",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-astro": "^0.5.4",
|
||||
"rehype-raw": "^6.1.1",
|
||||
"rehype-retext": "^3.0.2",
|
||||
"rehype-slug-custom-id": "^1.1.0",
|
||||
|
||||
Reference in New Issue
Block a user