Skip to content

Commit

Permalink
build(tools): setup linting & formatting for project's file
Browse files Browse the repository at this point in the history
  • Loading branch information
derevnjuk authored and Romakita committed Feb 14, 2022
1 parent 147f9fe commit 53cb356
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 73 deletions.
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
docs
examples
node_modules
packages/**/test/**/*.ts
docs
**/lib
**/dist
**/coverage
**/.nyc_output
**/node_modules
*-lock.json
*.lock
benchmarks.*
14 changes: 3 additions & 11 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"extends": ["prettier", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
Expand All @@ -31,10 +28,5 @@
"no-empty": "off",
"prefer-const": "off",
"no-fallthrough": "off"
},
"ignorePatterns": [
"**/lib/**/*.ts",
"**/test/**/*.ts",
"**/node_modules/**/*.ts"
]
}
}
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
docs
node_modules
**/lib
**/dist
**/coverage
**/.nyc_output
**/node_modules
*-lock.json
*.lock
benchmarks.*
11 changes: 6 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ next: false
sidebar: auto
otherTopics: true
meta:
- name: description
content: Documentation over the server configuration. Ts.ED is built on top of Express/Koa and use TypeScript language.
- name: keywords
content: configuration ts.ed express typescript node.js javascript decorators mvc class models
- name: description
content: Documentation over the server configuration. Ts.ED is built on top of Express/Koa and use TypeScript language.
- name: keywords
content: configuration ts.ed express typescript node.js javascript decorators mvc class models
---

# Configuration

This page has moved to [/docs/configuration.html](/docs/configuration.html).
This page has moved to [/docs/configuration.html](/docs/configuration.html).
6 changes: 0 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"vuepress:serve": "vuepress dev .",
"browserslist": "npx browserslist@latest --update-db"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"post-commit": "git update-index --again"
}
},
"repository": {
"type": "git",
"url": "https://github.com/tsedio/tsed.git"
Expand Down
3 changes: 2 additions & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
"packages/**/*.{ts,js}": ["prettier --write", "eslint --fix"]
"**/*.{ts,js}": ["eslint --fix"],
"**/*.{ts,js,json,md,yml,yaml}": ["prettier --write"]
};
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"test:packages": "lerna run test --stream --concurrency 2",
"test:global": "cross-env NODE_ENV=test nyc mocha",
"test:coverage": "yarn test:global && yarn test:packages",
"test:lint": "eslint packages --ext .ts",
"test:lint:fix": "eslint packages --ext .ts --fix",
"test:lint": "eslint '**/*.{ts,js}'",
"test:lint:fix": "yarn test:lint --fix",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"build": "monorepo build --verbose",
"sync:packages": "monorepo sync packages",
Expand All @@ -48,7 +48,7 @@
"vuepress:ref:build": "cd ./docs-references && yarn vuepress:build",
"vuepress:docs:serve": "yarn docs:install && cd docs && yarn vuepress:serve -p 8080",
"vuepress:ref:serve": "yarn docs:install && cd docs-references && yarn vuepress:serve -p 8081",
"prettier": "prettier '{packages,test}/**/*.ts' --write",
"prettier": "prettier '**/*.{ts,js,json,md,yml,yaml}' --write",
"release": "semantic-release",
"release:dryRun": "semantic-release --dry-run",
"benchmarks": "lerna run benchmarks --stream --no-prefix",
Expand Down Expand Up @@ -119,18 +119,18 @@
"@types/sinon-chai": "3.2.4",
"@types/superagent": "4.1.10",
"@types/supertest": "2.0.10",
"@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.27.0",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"chalk": "4.1.0",
"concurrently": "5.3.0",
"coveralls": "3.1.0",
"cross-env": "7.0.2",
"eslint": "^7.10.0",
"eslint-config-prettier": "6.12.0",
"eslint-plugin-mocha": "8.0.0",
"eslint-plugin-prettier": "3.1.4",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-mocha": "10.0.3",
"eslint-plugin-prettier": "4.0.0",
"faker": "^5.1.0",
"fs-extra": "9.0.1",
"husky": "^7.0.4",
Expand All @@ -141,7 +141,7 @@
"mocha": "8.2.1",
"moment": "2.29.1",
"nyc": "15.1.0",
"prettier": "2.1.2",
"prettier": "2.5.1",
"proxyquire": "2.1.3",
"semantic-release": "17.2.3",
"sinon": "9.0.3",
Expand Down
24 changes: 3 additions & 21 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,8 @@
"noEmit": true,
"allowJs": true,
"skipLibCheck": true,
"lib": [
"ES2019",
"esnext.asynciterable"
],
"typeRoots": [
"./node_modules/@types"
]
"lib": ["ES2019", "esnext.asynciterable"],
"typeRoots": ["./node_modules/@types"]
},
"linterOptions": {
"exclude": [
"docs",
"integration",
"examples/**"
]
},
"exclude": [
"docs",
"integration",
"examples/**",
"coverage",
".nyc_output"
]
"exclude": ["docs", "integration", "examples/**", "coverage", ".nyc_output"]
}
17 changes: 1 addition & 16 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,5 @@
]
}
},
"linterOptions": {
"exclude": [
"docs",
"integration",
"examples"
]
},
"exclude": [
"test",
"**/test",
"docs",
"integration",
"examples",
"lib",
"**/lib"
]
"exclude": ["node_modules", "**/node_modules", "**/dist", "**/.*/"]
}

0 comments on commit 53cb356

Please sign in to comment.