-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Noah Negin-Ulster
committed
Nov 14, 2023
1 parent
db5701a
commit 05b3fbc
Showing
25 changed files
with
9,861 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
max_line_length = off | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[{CHANGELOG.md,package.json,yarn.lock}] | ||
indent_size = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
reports | ||
coverage | ||
!.eslintrc.js | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@tophat/eslint-config/base', '@tophat/eslint-config/jest'], | ||
parserOptions: { | ||
project: './tsconfig.lint.json', | ||
}, | ||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
printWidth: 100, | ||
tabWidth: 4, | ||
semi: false, | ||
trailingComma: 'all' /* Reduces git diff. */, | ||
singleQuote: true, | ||
arrowParens: 'always', // Reduces character diff when adding Typescript types. | ||
}, | ||
], | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'no-empty': ['error', { allowEmptyCatch: true }], | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { order: 'asc' }, | ||
'newlines-between': 'always', | ||
groups: [ | ||
'unknown', | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
], | ||
}, | ||
], | ||
}, | ||
ignorePatterns: ['**/.*', 'packages/**/*.js', '**/lib'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# OS Specific | ||
.DS_STORE | ||
|
||
# IDE | ||
.idea/ | ||
.vim/ | ||
.vscode/* | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/settings.json | ||
|
||
# Dependency Management | ||
node_modules | ||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/versions | ||
!.yarn/patches | ||
!.yarn/sdks | ||
.pnp.* | ||
|
||
# Transient Files | ||
*.tsbuildinfo | ||
*.log | ||
*.tmp | ||
.tmp | ||
|
||
# Build Artifacts | ||
lib | ||
./reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/iron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"arcanis.vscode-zipfs", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
}, | ||
"eslint.nodePath": ".yarn/sdks", | ||
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs", | ||
"typescript.tsdk": ".yarn/sdks/typescript/lib", | ||
"typescript.enablePromptUseWorkspaceTsdk": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/bin/eslint.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real eslint/bin/eslint.js your application uses | ||
module.exports = absRequire(`eslint/bin/eslint.js`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "eslint", | ||
"version": "8.53.0-sdk", | ||
"main": "./lib/api.js", | ||
"type": "commonjs", | ||
"bin": { | ||
"eslint": "./bin/eslint.js" | ||
}, | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": "./lib/api.js", | ||
"./use-at-your-own-risk": "./lib/unsupported-api.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This file is automatically generated by @yarnpkg/sdks. | ||
# Manual changes might be lost! | ||
|
||
integrations: | ||
- vscode | ||
- vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require prettier/bin/prettier.cjs | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real prettier/bin/prettier.cjs your application uses | ||
module.exports = absRequire(`prettier/bin/prettier.cjs`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require prettier | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real prettier your application uses | ||
module.exports = absRequire(`prettier`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "prettier", | ||
"version": "3.1.0-sdk", | ||
"main": "./index.cjs", | ||
"type": "commonjs", | ||
"bin": "./bin/prettier.cjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require typescript/bin/tsc | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real typescript/bin/tsc your application uses | ||
module.exports = absRequire(`typescript/bin/tsc`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require typescript/bin/tsserver | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real typescript/bin/tsserver your application uses | ||
module.exports = absRequire(`typescript/bin/tsserver`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "typescript", | ||
"version": "5.2.2-sdk", | ||
"main": "./lib/typescript.js", | ||
"type": "commonjs", | ||
"bin": { | ||
"tsc": "./bin/tsc", | ||
"tsserver": "./bin/tsserver" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
nodeLinker: pnp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# validate-schema | ||
# NodeJS Tools Monorepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// @ts-check | ||
|
||
const CI = Boolean(process.env.CI) | ||
|
||
/** @type {import('@jest/types').Config.InitialOptions} */ | ||
const config = { | ||
...(CI && { | ||
reporters: [ | ||
'default', | ||
[ | ||
'jest-junit', | ||
{ | ||
suiteName: 'Jest Tests', | ||
outputDirectory: 'reports/jest/', | ||
outputName: 'jest.junit.xml', | ||
}, | ||
], | ||
], | ||
collectCoverage: true, | ||
}), | ||
transform: { | ||
'^.+\\.tsx?$': require.resolve('ts-jest'), | ||
}, | ||
setupFiles: ['<rootDir>/testUtils/setup.ts'], | ||
coverageReporters: CI ? ['json'] : ['text', 'json'], | ||
coverageDirectory: 'raw-coverage/jest/', | ||
collectCoverageFrom: ['packages/**/src/**/*.ts', '.yarn/__virtual__/**/packages/**/*.ts'], | ||
coveragePathIgnorePatterns: ['/node_modules/', '/__mocks__/', '\\.test.ts$', '\\.mock.ts$'], | ||
watchPathIgnorePatterns: [ | ||
'<rootDir>/example-monorepo', | ||
'<rootDir>/artifacts', | ||
'<rootDir>/packages/.*/lib', | ||
'<rootDir>/packages/.*/.*\\.js', | ||
], | ||
testPathIgnorePatterns: [ | ||
'/node_modules/', | ||
'/.yarn/', | ||
'<rootDir>/.*\\.js', | ||
'<rootDir>/.*/lib/', | ||
'<rootDir>/packages', | ||
], | ||
haste: { | ||
throwOnModuleCollision: true, | ||
}, | ||
modulePathIgnorePatterns: ['<rootDir>/.*/lib'], | ||
testTimeout: 30000, | ||
resolver: require.resolve('@tophat/jest-resolver'), | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"name": "@noahnu/nodejs-tools", | ||
"private": true, | ||
"description": "NodeJS tools.", | ||
"author": { | ||
"name": "noahnu", | ||
"email": "[email protected]", | ||
"url": "https://noahnu.com" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/noahnu/nodejs-tools.git" | ||
}, | ||
"license": "MIT", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"@jest/types": "^29.6.3", | ||
"@monodeploy/plugin-github": "^2.0.1", | ||
"@tophat/commitizen-adapter": "^1.0.2", | ||
"@tophat/commitlint-config": "^1.0.2", | ||
"@tophat/conventional-changelog-config": "^1.0.1", | ||
"@tophat/eslint-config": "^9.0.0", | ||
"@tophat/eslint-import-resolver-require": "^1.0.0", | ||
"@tophat/jest-resolver": "^0.1.0", | ||
"@types/jest": "^29.5.8", | ||
"@types/node": "^20", | ||
"@typescript-eslint/eslint-plugin": "^6.11.0", | ||
"@typescript-eslint/parser": "^6.11.0", | ||
"@yarnpkg/sdks": "^3.1.0", | ||
"commitizen": "^4.3.0", | ||
"eslint": "^8.53.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-import-resolver-node": "^0.3.9", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-import": "^2.29.0", | ||
"eslint-plugin-jest": "^27.6.0", | ||
"eslint-plugin-jsx-a11y": "^6.8.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"husky": "^8.0.3", | ||
"jest": "^29.7.0", | ||
"lint-staged": "^15.1.0", | ||
"monodeploy": "^5.0.1", | ||
"prettier": "^3.1.0", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "5.2.2" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf ${ARTIFACT_DIR:-artifacts} && yarn workspaces foreach -vpi --worktree run clean", | ||
"build": "yarn workspaces foreach -vpi --worktree --topological-dev run prepack", | ||
"lint:ci": "eslint . --format junit --output-file reports/eslint.junit.xml", | ||
"lint:fix": "eslint . --fix", | ||
"lint": "eslint .", | ||
"test:ci": "CI=1 run test --ci --runInBand", | ||
"test:watch": "run test --watch", | ||
"test": "jest --config=jest.config.js", | ||
"types:watch": "tsc --noEmit --emitDeclarationOnly false --pretty --watch" | ||
} | ||
} |
Empty file.
Oops, something went wrong.