Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.pnp.*
!.yarn/releases
!.yarn/plugins
dist
node_modules
lib
node_modules
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
20 changes: 18 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,49 @@
"description": "Official Trilon Eslint Plugin",
"type": "commonjs",
"main": "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",
"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"
}
}
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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 = {
rules: {
'@trilon/enforce-close-testing-module': enforceCloseTestingModuleRule,
},
};

module.exports = plugin;
8 changes: 8 additions & 0 deletions tsconfig.build.json
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"
}
}
Loading