@simpleapps-com/augur-config 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@simpleapps-com/augur-config",
3
+ "version": "0.1.1",
4
+ "description": "Shared tooling configuration presets for Augur ecommerce sites",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/simpleapps-com/augur-packages.git",
9
+ "directory": "packages/augur-config"
10
+ },
11
+ "type": "module",
12
+ "exports": {
13
+ "./eslint": "./src/eslint.js",
14
+ "./prettier": "./src/prettier.js",
15
+ "./tsconfig/base": "./src/tsconfig/base.json",
16
+ "./tsconfig/react": "./src/tsconfig/react.json",
17
+ "./tsconfig/react-native": "./src/tsconfig/react-native.json"
18
+ },
19
+ "files": [
20
+ "src"
21
+ ],
22
+ "dependencies": {
23
+ "@typescript-eslint/eslint-plugin": "^8.30.0",
24
+ "@typescript-eslint/parser": "^8.30.0",
25
+ "eslint-plugin-react-hooks": "^5.2.0",
26
+ "prettier-plugin-tailwindcss": "^0.6.0"
27
+ },
28
+ "peerDependencies": {
29
+ "eslint": "^9.0.0",
30
+ "prettier": "^3.0.0",
31
+ "typescript": "^5.0.0"
32
+ },
33
+ "peerDependenciesMeta": {
34
+ "prettier": {
35
+ "optional": true
36
+ },
37
+ "eslint": {
38
+ "optional": true
39
+ },
40
+ "typescript": {
41
+ "optional": true
42
+ }
43
+ },
44
+ "scripts": {
45
+ "lint": "echo 'no lint for config-only package'"
46
+ }
47
+ }
package/src/eslint.js ADDED
@@ -0,0 +1,35 @@
1
+ import tseslint from "@typescript-eslint/eslint-plugin";
2
+ import tsParser from "@typescript-eslint/parser";
3
+ import reactHooks from "eslint-plugin-react-hooks";
4
+
5
+ /** @type {import("eslint").Linter.Config[]} */
6
+ export default [
7
+ {
8
+ files: ["**/*.{ts,tsx}"],
9
+ languageOptions: {
10
+ parser: tsParser,
11
+ parserOptions: {
12
+ ecmaFeatures: { jsx: true },
13
+ },
14
+ },
15
+ plugins: {
16
+ "@typescript-eslint": tseslint,
17
+ "react-hooks": reactHooks,
18
+ },
19
+ rules: {
20
+ ...tseslint.configs.recommended.rules,
21
+ ...reactHooks.configs.recommended.rules,
22
+ "@typescript-eslint/no-unused-vars": [
23
+ "error",
24
+ { argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
25
+ ],
26
+ "@typescript-eslint/no-explicit-any": "warn",
27
+ "complexity": ["warn", 15],
28
+ "max-depth": ["warn", 4],
29
+ "max-nested-callbacks": ["warn", 3],
30
+ },
31
+ },
32
+ {
33
+ ignores: ["dist/", "node_modules/", ".turbo/", ".next/"],
34
+ },
35
+ ];
@@ -0,0 +1,12 @@
1
+ /** @type {import("prettier").Config} */
2
+ export default {
3
+ semi: true,
4
+ trailingComma: "all",
5
+ singleQuote: false,
6
+ printWidth: 100,
7
+ tabWidth: 2,
8
+ useTabs: false,
9
+ bracketSpacing: true,
10
+ arrowParens: "always",
11
+ plugins: ["prettier-plugin-tailwindcss"],
12
+ };
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "target": "ES2022",
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler",
8
+ "lib": ["ES2022"],
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "declaration": true,
15
+ "declarationMap": true,
16
+ "sourceMap": true,
17
+ "noUncheckedIndexedAccess": true,
18
+ "noEmit": true
19
+ },
20
+ "exclude": ["node_modules", "dist"]
21
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx",
6
+ "lib": ["ES2022"]
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"]
7
+ }
8
+ }