-
Notifications
You must be signed in to change notification settings - Fork 0
chore: define build & package scripts #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a10d818
chore: add node-version file
rickdgeerling aca1c14
chore: define build step
rickdgeerling a1a4186
chore: prepare package for plugin
rickdgeerling 1b9786a
chore: prepare for first publish
rickdgeerling b421622
chore: fix pre-upload scripts
rickdgeerling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,5 +2,5 @@ | |
| .pnp.* | ||
| !.yarn/releases | ||
| !.yarn/plugins | ||
| dist | ||
| node_modules | ||
| lib | ||
| node_modules | ||
This file contains hidden or 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 @@ | ||
| v20 |
This file contains hidden or 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
This file contains hidden or 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,36 +1,53 @@ | ||
| { | ||
| "name": "eslint-plugin", | ||
| "version": "1.0.0", | ||
| "name": "@trilon/eslint-plugin", | ||
| "version": "0.0.1", | ||
| "description": "Official Trilon Eslint Plugin", | ||
| "type": "commonjs", | ||
| "main": "index.js", | ||
| "main": "./lib/index.js", | ||
| "types": "./lib/index.d.ts", | ||
| "files": [ | ||
| "lib/**/*", | ||
| "package.json", | ||
| "README.md", | ||
| "LICENSE" | ||
| ], | ||
| "engines": { | ||
| "node": ">=20.9.0", | ||
| "yarn": ">=4.0.2" | ||
| }, | ||
| "scripts": { | ||
| "tsc": "tsc", | ||
| "prepublish": "tsc", | ||
| "tsc": "rimraf ./lib && tsc -p tsconfig.build.json && tsc-alias", | ||
| "test": "tsx --import ./tests/global.setup.js --test tests/**/*.spec.ts", | ||
| "format": "prettier --write .", | ||
| "lint": "eslint . --ext .ts --max-warnings 0" | ||
| }, | ||
| "keywords": [ | ||
| "eslint", | ||
| "eslintplugin" | ||
| "eslintplugin", | ||
| "nestjs", | ||
| "nest", | ||
| "trilon" | ||
| ], | ||
| "author": "Trilon Team", | ||
| "license": "ISC", | ||
| "packageManager": "[email protected]", | ||
| "devDependencies": { | ||
| "@types/eslint": "^8", | ||
| "@types/node": "^20.10.7", | ||
| "@typescript-eslint/eslint-plugin": "^6.13.1", | ||
| "@typescript-eslint/parser": "^6.13.1", | ||
| "@typescript-eslint/rule-tester": "^6.13.1", | ||
| "@typescript-eslint/utils": "^6.13.1", | ||
| "eslint": "^8.54.0", | ||
| "eslint-config-prettier": "^9.0.0", | ||
| "prettier": "^3.1.0", | ||
| "rimraf": "^5.0.5", | ||
| "tsc-alias": "^1.8.8", | ||
| "tsx": "^4.6.2", | ||
| "typescript": "^5.3.2" | ||
| }, | ||
| "peerDependencies": { | ||
| "eslint": ">=8.0.0" | ||
| } | ||
| } | ||
This file contains hidden or 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,15 @@ | ||
| import enforceCloseTestingModuleRule from './rules/enforce-close-testing-module.rule'; | ||
|
|
||
| // TODO: we should type this as ESLint.Plugin but there's a type incompatibilities with the utils package | ||
| const plugin = { | ||
| configs: { | ||
| recommended: { | ||
| rules: { '@trilon/enforce-close-testing-module': 'error' }, | ||
| }, | ||
| }, | ||
| rules: { | ||
| 'enforce-close-testing-module': enforceCloseTestingModuleRule, | ||
| }, | ||
| }; | ||
|
|
||
| module.exports = plugin; |
This file contains hidden or 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,8 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "include": ["src/**/*ts"], | ||
| "exclude": ["tests"], | ||
| "compilerOptions": { | ||
| "rootDir": "./src" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should also make sure all tests are passing and style is correct, thoughts @tuxmachine ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but that can be enforced in CI right? This is just ensuring that whenever we publish a package, we build a fresh package, and don't accidentally upload an outdated
libsfolder.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of npm@5,
prepublishscripts are deprecated. Usepreparefor build steps andprepublishOnlyfor upload-only.