@nextnode-solutions/standards 1.0.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,100 @@
1
+ {
2
+ "name": "@nextnode-solutions/standards",
3
+ "version": "1.0.1",
4
+ "description": "Centralized development standards for NextNode projects: oxlint, oxfmt, TypeScript, Tailwind, Vitest, commitlint",
5
+ "keywords": [
6
+ "commitlint",
7
+ "formatting",
8
+ "linting",
9
+ "nextnode",
10
+ "oxfmt",
11
+ "oxlint",
12
+ "standards"
13
+ ],
14
+ "homepage": "https://github.com/NextNodeSolutions/standards#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/NextNodeSolutions/standards/issues"
17
+ },
18
+ "license": "MIT",
19
+ "author": "NextNode Solutions",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/NextNodeSolutions/standards.git"
23
+ },
24
+ "files": [
25
+ "README.md",
26
+ "src"
27
+ ],
28
+ "type": "module",
29
+ "exports": {
30
+ "./oxlint": "./src/oxlint/base.json",
31
+ "./oxfmt": "./src/oxfmt/base.json",
32
+ "./typescript/library": "./src/typescript/tsconfig.library.json",
33
+ "./typescript/nextjs": "./src/typescript/tsconfig.nextjs.json",
34
+ "./typescript/astro": "./src/typescript/tsconfig.astro.json",
35
+ "./tailwind": "./src/tailwind/preset.js",
36
+ "./vitest/frontend": {
37
+ "types": "./src/vitest/vitest.frontend.d.ts",
38
+ "default": "./src/vitest/vitest.frontend.js"
39
+ },
40
+ "./vitest/backend": {
41
+ "types": "./src/vitest/vitest.backend.d.ts",
42
+ "default": "./src/vitest/vitest.backend.js"
43
+ },
44
+ "./commitlint": "./src/commitlint/base.js",
45
+ "./lint-staged": "./src/lint-staged/base.js"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public",
49
+ "registry": "https://registry.npmjs.org/"
50
+ },
51
+ "scripts": {
52
+ "build": "echo 'No build step needed for config package'",
53
+ "format": "oxfmt --write .",
54
+ "format:check": "oxfmt --check .",
55
+ "lint": "oxlint",
56
+ "prepare": "husky",
57
+ "test": "echo 'Configuration package — no tests needed'"
58
+ },
59
+ "devDependencies": {
60
+ "@commitlint/cli": "^19.8.1",
61
+ "@commitlint/config-conventional": "^19.8.1",
62
+ "better-sort-package-json": "^1.1.1",
63
+ "husky": "^9.0.11",
64
+ "lint-staged": "^15.2.2",
65
+ "oxfmt": "^0.28.0",
66
+ "oxlint": "^1.43.0"
67
+ },
68
+ "peerDependencies": {
69
+ "@commitlint/cli": "^19.0.0",
70
+ "@commitlint/config-conventional": "^19.0.0",
71
+ "oxfmt": ">=0.7.0",
72
+ "oxlint": ">=0.16.0",
73
+ "tailwindcss": "^4.0.0",
74
+ "vitest": "^3.0.0 || ^4.0.0"
75
+ },
76
+ "peerDependenciesMeta": {
77
+ "@commitlint/cli": {
78
+ "optional": true
79
+ },
80
+ "@commitlint/config-conventional": {
81
+ "optional": true
82
+ },
83
+ "oxfmt": {
84
+ "optional": false
85
+ },
86
+ "oxlint": {
87
+ "optional": false
88
+ },
89
+ "tailwindcss": {
90
+ "optional": true
91
+ },
92
+ "vitest": {
93
+ "optional": true
94
+ }
95
+ },
96
+ "engines": {
97
+ "node": ">=24.0.0"
98
+ },
99
+ "packageManager": "pnpm@10.11.0"
100
+ }
@@ -0,0 +1,37 @@
1
+ export default {
2
+ extends: ['@commitlint/config-conventional'],
3
+ rules: {
4
+ 'type-enum': [
5
+ 2,
6
+ 'always',
7
+ [
8
+ 'feat',
9
+ 'fix',
10
+ 'docs',
11
+ 'style',
12
+ 'refactor',
13
+ 'perf',
14
+ 'test',
15
+ 'build',
16
+ 'ci',
17
+ 'chore',
18
+ 'revert',
19
+ ],
20
+ ],
21
+ 'type-case': [2, 'always', 'lower-case'],
22
+ 'type-empty': [2, 'never'],
23
+ 'scope-case': [2, 'always', 'lower-case'],
24
+ 'subject-case': [
25
+ 2,
26
+ 'never',
27
+ ['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
28
+ ],
29
+ 'subject-empty': [2, 'never'],
30
+ 'subject-full-stop': [2, 'never', '.'],
31
+ 'header-max-length': [2, 'always', 100],
32
+ 'body-leading-blank': [1, 'always'],
33
+ 'body-max-line-length': [2, 'always', 100],
34
+ 'footer-leading-blank': [1, 'always'],
35
+ 'footer-max-line-length': [2, 'always', 100],
36
+ },
37
+ }
@@ -0,0 +1,4 @@
1
+ export default {
2
+ 'package.json': ['better-sort-package-json'],
3
+ '*': ['oxlint', 'oxfmt --write'],
4
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "useTabs": true,
3
+ "tabWidth": 4,
4
+ "endOfLine": "lf",
5
+ "printWidth": 80,
6
+ "trailingComma": "all",
7
+ "semi": false,
8
+ "arrowParens": "avoid",
9
+ "bracketSpacing": true,
10
+ "singleQuote": true,
11
+ "jsxSingleQuote": false,
12
+ "bracketSameLine": false,
13
+ "experimentalTailwindcss": {},
14
+ "experimentalSortImports": {
15
+ "groups": [
16
+ ["side-effect"],
17
+ ["builtin"],
18
+ ["external", "type-external"],
19
+ ["internal", "type-internal"],
20
+ ["parent", "type-parent"],
21
+ ["sibling", "type-sibling"],
22
+ ["index", "type-index"]
23
+ ],
24
+ "newlinesBetween": "always"
25
+ },
26
+ "overrides": [
27
+ {
28
+ "files": ["*.json"],
29
+ "options": {
30
+ "trailingComma": "none"
31
+ }
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
3
+ "categories": {
4
+ "correctness": "error",
5
+ "suspicious": "warn",
6
+ "perf": "warn"
7
+ },
8
+ "plugins": ["typescript", "react", "unicorn", "import"],
9
+ "rules": {
10
+ "eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }],
11
+ "eslint/prefer-const": "error",
12
+ "eslint/no-var": "error",
13
+ "eslint/no-debugger": "error",
14
+ "eslint/no-console": "warn",
15
+ "eslint/eqeqeq": "error",
16
+ "eslint/prefer-template": "error",
17
+ "eslint/arrow-body-style": "error",
18
+ "eslint/complexity": ["error", { "max": 15 }],
19
+ "eslint/no-magic-numbers": [
20
+ "error",
21
+ {
22
+ "ignore": [0, 1, -1],
23
+ "ignoreEnums": true,
24
+ "ignoreReadonlyClassProperties": true
25
+ }
26
+ ],
27
+ "typescript/no-explicit-any": "error",
28
+ "typescript/consistent-type-imports": [
29
+ "error",
30
+ { "prefer": "type-imports", "fixStyle": "separate-type-imports" }
31
+ ],
32
+ "typescript/no-dynamic-delete": "error",
33
+ "typescript/explicit-function-return-type": [
34
+ "error",
35
+ {
36
+ "allowExpressions": true,
37
+ "allowTypedFunctionExpressions": true,
38
+ "allowHigherOrderFunctions": true,
39
+ "allowDirectConstAssertionInArrowFunctions": true
40
+ }
41
+ ],
42
+ "react/exhaustive-deps": "warn",
43
+ "react/rules-of-hooks": "error",
44
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"]
45
+ },
46
+ "overrides": [
47
+ {
48
+ "files": ["**/*.config.*", "**/*.test.*", "**/*.spec.*"],
49
+ "rules": {
50
+ "eslint/no-console": "off",
51
+ "typescript/no-explicit-any": "warn",
52
+ "eslint/no-magic-numbers": "off"
53
+ }
54
+ },
55
+ {
56
+ "files": ["**/tsconfig*.json"],
57
+ "rules": {}
58
+ }
59
+ ],
60
+ "env": {
61
+ "browser": true,
62
+ "es2024": true,
63
+ "node": true
64
+ },
65
+ "globals": {
66
+ "React": "readonly",
67
+ "JSX": "readonly",
68
+ "NodeJS": "readonly"
69
+ }
70
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NextNode Tailwind CSS Preset
3
+ * Brand-agnostic defaults for all NextNode projects
4
+ */
5
+ export default {
6
+ theme: {
7
+ container: {
8
+ center: true,
9
+ padding: {
10
+ DEFAULT: '1rem',
11
+ sm: '2rem',
12
+ lg: '4rem',
13
+ xl: '5rem',
14
+ '2xl': '6rem',
15
+ },
16
+ },
17
+ extend: {
18
+ screens: {
19
+ xs: '475px',
20
+ },
21
+ },
22
+ },
23
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "extends": "astro/tsconfigs/strict",
3
+ "compilerOptions": {
4
+ // Target & Module Configuration
5
+ "target": "es2022",
6
+ "module": "preserve",
7
+ "moduleDetection": "force",
8
+ "lib": ["es2022", "dom", "dom.iterable"],
9
+
10
+ // JavaScript & JSON Support
11
+ "allowJs": true,
12
+ "resolveJsonModule": true,
13
+ "skipLibCheck": true,
14
+
15
+ // Module System
16
+ "esModuleInterop": true,
17
+ "isolatedModules": true,
18
+ "verbatimModuleSyntax": true,
19
+
20
+ // Type Safety
21
+ "strict": true,
22
+ "noUncheckedIndexedAccess": true,
23
+ "noImplicitOverride": true,
24
+
25
+ // Output Configuration
26
+ "noEmit": true
27
+ }
28
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ // Target & Module Configuration
4
+ "target": "ES2023",
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "lib": ["ES2023"],
8
+
9
+ // Type Safety — Maximum Strictness
10
+ "strict": true,
11
+ "noUncheckedIndexedAccess": true,
12
+ "exactOptionalPropertyTypes": true,
13
+ "noImplicitOverride": true,
14
+ "noImplicitReturns": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "noUncheckedSideEffectImports": true,
17
+
18
+ // ESM — Library Ready
19
+ "isolatedModules": true,
20
+ "verbatimModuleSyntax": true,
21
+
22
+ // Compatibility
23
+ "forceConsistentCasingInFileNames": true,
24
+ "allowSyntheticDefaultImports": true,
25
+ "esModuleInterop": true,
26
+ "resolveJsonModule": true,
27
+ "skipLibCheck": true,
28
+ "allowJs": true,
29
+
30
+ // Development Mode — No Emit
31
+ "noEmit": true
32
+ }
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ // Target & Module Configuration
4
+ "target": "ES2023",
5
+ "lib": ["dom", "dom.iterable", "esnext"],
6
+ "module": "esnext",
7
+ "moduleResolution": "bundler",
8
+
9
+ // JavaScript & JSON Support
10
+ "allowJs": true,
11
+ "resolveJsonModule": true,
12
+ "skipLibCheck": true,
13
+
14
+ // Type Safety
15
+ "strict": true,
16
+ "noUncheckedIndexedAccess": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "noImplicitOverride": true,
19
+ "noImplicitReturns": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+
22
+ // Module System
23
+ "esModuleInterop": true,
24
+ "isolatedModules": true,
25
+
26
+ // JSX Configuration
27
+ "jsx": "preserve",
28
+
29
+ // Build Configuration
30
+ "incremental": true,
31
+ "noEmit": true
32
+ }
33
+ }
@@ -0,0 +1,4 @@
1
+ import type { UserConfig } from 'vitest/config'
2
+
3
+ declare const config: UserConfig
4
+ export default config
@@ -0,0 +1,33 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ // Environment Configuration
6
+ globals: true,
7
+ environment: 'node',
8
+ env: {
9
+ NODE_ENV: 'test',
10
+ },
11
+
12
+ // Mock Cleanup Configuration
13
+ restoreMocks: true,
14
+ clearMocks: true,
15
+ unstubGlobals: true,
16
+ mockReset: false,
17
+
18
+ // Coverage Configuration
19
+ coverage: {
20
+ provider: 'v8',
21
+ reporter: ['text', 'json', 'html'],
22
+ exclude: [
23
+ 'node_modules/**',
24
+ 'dist/**',
25
+ '**/*.d.ts',
26
+ '**/*.test.ts',
27
+ '**/*.spec.ts',
28
+ '**/*.config.ts',
29
+ '**/types.ts',
30
+ ],
31
+ },
32
+ },
33
+ })
@@ -0,0 +1,4 @@
1
+ import type { UserConfig } from 'vitest/config'
2
+
3
+ declare const config: UserConfig
4
+ export default config
@@ -0,0 +1,35 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ // Environment Configuration
6
+ environment: 'jsdom',
7
+ globals: true,
8
+
9
+ // Mock Cleanup Configuration
10
+ restoreMocks: true,
11
+ clearMocks: true,
12
+ unstubGlobals: true,
13
+ mockReset: false,
14
+
15
+ // Coverage Configuration
16
+ coverage: {
17
+ provider: 'v8',
18
+ reporter: ['json', 'html', 'text'],
19
+ enabled: true,
20
+ exclude: [
21
+ '**/*.test.ts',
22
+ '**/*.test.tsx',
23
+ '**/*.spec.ts',
24
+ '**/*.spec.tsx',
25
+ '**/node_modules/**',
26
+ '**/dist/**',
27
+ '**/.astro/**',
28
+ '**/coverage/**',
29
+ '**/tests/**',
30
+ '**/config/**',
31
+ '**/types/**',
32
+ ],
33
+ },
34
+ },
35
+ })