@nextnode-solutions/standards 1.0.0

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,103 @@
1
+ {
2
+ "name": "@nextnode-solutions/standards",
3
+ "version": "1.0.0",
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/core#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/NextNodeSolutions/core/issues"
17
+ },
18
+ "license": "MIT",
19
+ "author": "NextNode Solutions",
20
+ "files": [
21
+ "README.md",
22
+ "src"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/NextNodeSolutions/core.git"
27
+ },
28
+ "scripts": {
29
+ "build": "echo 'No build step needed for config package'",
30
+ "format": "oxfmt --write .",
31
+ "format:check": "oxfmt --check .",
32
+ "lint": "oxlint",
33
+ "prepare": "husky",
34
+ "test": "echo 'Configuration package — no tests needed'"
35
+ },
36
+ "devDependencies": {
37
+ "@commitlint/cli": "^19.8.1",
38
+ "@commitlint/config-conventional": "^19.8.1",
39
+ "better-sort-package-json": "^1.1.1",
40
+ "husky": "^9.0.11",
41
+ "lint-staged": "^15.2.2",
42
+ "oxfmt": "^0.28.0",
43
+ "oxlint": "^1.43.0"
44
+ },
45
+ "peerDependencies": {
46
+ "@commitlint/cli": "^19.0.0",
47
+ "@commitlint/config-conventional": "^19.0.0",
48
+ "oxfmt": ">=0.7.0",
49
+ "oxlint": ">=0.16.0",
50
+ "tailwindcss": "^4.0.0",
51
+ "vitest": "^3.0.0 || ^4.0.0"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "@commitlint/cli": {
55
+ "optional": true
56
+ },
57
+ "@commitlint/config-conventional": {
58
+ "optional": true
59
+ },
60
+ "oxfmt": {
61
+ "optional": false
62
+ },
63
+ "oxlint": {
64
+ "optional": false
65
+ },
66
+ "tailwindcss": {
67
+ "optional": true
68
+ },
69
+ "vitest": {
70
+ "optional": true
71
+ }
72
+ },
73
+ "engines": {
74
+ "node": ">=24.0.0"
75
+ },
76
+ "publishConfig": {
77
+ "access": "public",
78
+ "registry": "https://registry.npmjs.org/"
79
+ },
80
+ "packageManager": "pnpm@10.11.0",
81
+ "type": "module",
82
+ "exports": {
83
+ "./oxlint": "./src/oxlint/base.json",
84
+ "./oxfmt": "./src/oxfmt/base.json",
85
+ "./typescript/library": "./src/typescript/tsconfig.library.json",
86
+ "./typescript/nextjs": "./src/typescript/tsconfig.nextjs.json",
87
+ "./typescript/astro": "./src/typescript/tsconfig.astro.json",
88
+ "./tailwind": "./src/tailwind/theme.css",
89
+ "./vitest/frontend": {
90
+ "types": "./src/vitest/vitest.frontend.d.ts",
91
+ "default": "./src/vitest/vitest.frontend.js"
92
+ },
93
+ "./vitest/backend": {
94
+ "types": "./src/vitest/vitest.backend.d.ts",
95
+ "default": "./src/vitest/vitest.backend.js"
96
+ },
97
+ "./commitlint": "./src/commitlint/base.js",
98
+ "./editorconfig": "./src/editorconfig/base.editorconfig",
99
+ "./npmrc": "./src/npmrc/base.npmrc",
100
+ "./lint-staged": "./src/lint-staged/base.js",
101
+ "./semantic-release": "./src/semantic-release/base.js"
102
+ }
103
+ }
@@ -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,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = tab
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
@@ -0,0 +1,8 @@
1
+ export default {
2
+ 'package.json': ['better-sort-package-json'],
3
+ '*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,svelte,astro}': [
4
+ 'oxlint',
5
+ 'oxfmt --write',
6
+ ],
7
+ '*.json': ['oxfmt --write'],
8
+ }
@@ -0,0 +1,3 @@
1
+ strict-peer-dependencies=false
2
+ auto-install-peers=true
3
+ shamefully-hoist=false
@@ -0,0 +1,33 @@
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
+ ["builtin"],
17
+ ["external", "type-external"],
18
+ ["internal", "type-internal"],
19
+ ["parent", "type-parent"],
20
+ ["sibling", "type-sibling"],
21
+ ["index", "type-index"]
22
+ ],
23
+ "newlinesBetween": true
24
+ },
25
+ "overrides": [
26
+ {
27
+ "files": ["*.json"],
28
+ "options": {
29
+ "trailingComma": "none"
30
+ }
31
+ }
32
+ ]
33
+ }
@@ -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,21 @@
1
+ export default {
2
+ plugins: [
3
+ '@semantic-release/commit-analyzer',
4
+ '@semantic-release/release-notes-generator',
5
+ '@semantic-release/npm',
6
+ [
7
+ '@semantic-release/git',
8
+ {
9
+ assets: ['package.json'],
10
+ message: 'chore(release): ${nextRelease.gitTag} [skip ci]',
11
+ },
12
+ ],
13
+ [
14
+ '@semantic-release/github',
15
+ {
16
+ successComment: false,
17
+ failTitle: false,
18
+ },
19
+ ],
20
+ ],
21
+ }
@@ -0,0 +1,13 @@
1
+ /*
2
+ * NextNode Tailwind CSS v4 Theme
3
+ * Brand-agnostic defaults for all NextNode projects
4
+ *
5
+ * Usage in consuming project's CSS:
6
+ *
7
+ * @import "tailwindcss";
8
+ * @import "@nextnode-solutions/standards/tailwind";
9
+ */
10
+
11
+ @theme {
12
+ --breakpoint-xs: 30rem;
13
+ }
@@ -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,31 @@
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
+ "resolveJsonModule": true,
25
+ "skipLibCheck": true,
26
+ "allowJs": true,
27
+
28
+ // Development Mode — No Emit
29
+ "noEmit": true
30
+ }
31
+ }
@@ -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
+ })