From 3d81ecb6cc2fb47f4b9689b0a837e11aed3d3557 Mon Sep 17 00:00:00 2001 From: nzambello Date: Sat, 10 Jun 2023 12:23:50 +0200 Subject: [PATCH] chore: add configs in package.json --- package.json | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/package.json b/package.json index 3689f30..e75f7e0 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,98 @@ "preview": "astro build && wrangler pages dev ./dist", "astro": "astro" }, + "engines": { + "node": ">=16" + }, + "packageManager": "yarn@3.2.3", + "prettier": { + "printWidth": 80, + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "arrowParens": "avoid", + "endOfLine": "auto", + "overrides": [ + { + "files": "*.css", + "options": { + "tabWidth": 4, + "printWidth": 120 + } + }, + { + "files": "*.json", + "options": { + "printWidth": 200 + } + } + ] + }, + "eslintIgnore": ["/node_modules", "/build"], + "eslintConfig": { + "env": { + "browser": true, + "es2021": true, + "jest": true + }, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": "latest", + "sourceType": "module" + }, + "settings": { + "react": { + "version": "detect" + } + }, + "globals": { + "JSX": "readonly", + "NodeJS": "readonly", + "MutationCallback": "readonly" + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:storybook/recommended", + "prettier" + ], + "plugins": [ + "jest", + "react", + "@typescript-eslint", + "prettier", + "react-hooks", + "jsx-a11y" + ], + "rules": { + "endOfLine": "off", + "react/no-unknown-property": "off", + "react/require-default-props": "off", + "no-unused-vars": "off", + "no-extra-boolean-cast": "off", + "no-console": "off", + "no-shadow": "off" + } + }, + "stylelint": { + "extends": [ + "stylelint-config-recommended", + "stylelint-config-prettier", + "stylelint-config-idiomatic-order" + ], + "rules": { + "at-rule-no-unknown": [ + true, + { + "ignoreAtRules": ["extend", "function", "include", "mixin", "return"] + } + ] + } + }, "dependencies": { "@astrojs/cloudflare": "^6.3.0", "@astrojs/rss": "^2.4.1", @@ -20,6 +112,13 @@ "astro": "^2.5.0" }, "devDependencies": { + "@commitlint/cli": "17.3.0", + "@commitlint/config-conventional": "17.3.0", + "husky": "8.0.2", + "stylelint": "14.15.0", + "stylelint-config-idiomatic-order": "9.0.0", + "stylelint-config-prettier": "9.0.4", + "stylelint-config-recommended": "9.0.0", "wrangler": "^3.0.1" } }