Created linter in interface module

pull/9/head
MiguelMLorente 2024-11-19 23:25:52 +01:00
parent 97de40a396
commit a1eaab6534
4 changed files with 1892 additions and 7 deletions

17
interface/.eslintrc.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: __dirname,
sourceType: "module",
},
plugins: ["@typescript-eslint/eslint-plugin"],
extends: ["plugin:@typescript-eslint/strict", "plugin:prettier/recommended"],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: [".eslintrc.js", "dist/"],
rules: {},
};

View File

@ -1,4 +1,4 @@
export enum TrackType { export enum TrackType {
RAIL = "RAIL", RAIL = "RAIL",
ROAD = "ROAD" ROAD = "ROAD",
}; }

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,21 @@
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "build": "npm run lint && tsc",
"build": "tsc" "lint": "eslint \"*.ts\" \"*/**/*.ts\" --fix"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@eslint/js": "^8.0.0",
"@types/node": "^22.9.0", "@types/node": "^22.9.0",
"typescript": "^5.6.3" "@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.12.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8.15.0"
} }
} }