-
Notifications
You must be signed in to change notification settings - Fork 6
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
#185 into [email protected] 🧊 add new eslint #186
Changes from all commits
538fa1f
ee02417
c791289
98d101e
47f0940
357dc7f
0c5fc52
d881ee4
0c84c68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo "husky - DEPRECATED | ||
Please remove the following two lines from $0: | ||
#!/usr/bin/env sh | ||
. \"\$(dirname -- \"\$0\")/_/husky.sh\" | ||
They WILL FAIL in v10.0.0 | ||
" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint-staged --no-stash | ||
yarn unit-test --run | ||
yarn build | ||
yarn lint-staged --no-stash |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yarn unit-test --run | ||
yarn build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export const resolveExportsFromSourceCode = (sourceCode: string) => { | ||
// @ts-ignore | ||
// @ts-expect-error: module is constructed | ||
const moduleInstance = new module.constructor(); | ||
// eslint-disable-next-line no-underscore-dangle | ||
|
||
moduleInstance._compile(sourceCode, ''); | ||
return moduleInstance.exports; | ||
}; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { eslint } from '@siberiacancode/eslint'; | ||
|
||
export default eslint( | ||
{ | ||
typescript: true | ||
} | ||
); |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. В папке bin/templates остался eslint config старого формата There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. кстати я совсем забыл про template для flat нужно будет добавить |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { eslint } from '@siberiacancode/eslint'; | ||
|
||
export default eslint( | ||
{ | ||
typescript: true | ||
}, | ||
{ | ||
name: 'mock-config-server/md', | ||
files: ['**/*.md'], | ||
rules: { | ||
'style/max-len': 'off' | ||
} | ||
}, | ||
{ | ||
name: 'mock-config-server/typescript', | ||
rules: { | ||
'node/prefer-global/process': 'off' | ||
} | ||
}, | ||
{ | ||
name: 'mock-config-server/views', | ||
files: ['**/static/views/**/*.js'], | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'unused-imports/no-unused-vars': 'off' | ||
} | ||
} | ||
); |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { eslint } from '@siberiacancode/eslint'; | ||
|
||
export default eslint( | ||
{ | ||
typescript: true | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,23 @@ | |
} | ||
], | ||
"license": "MIT", | ||
"homepage": "https://github.com/siberiacancode/mock-config-server", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/siberiacancode/mock-config-server.git" | ||
}, | ||
"keywords": [ | ||
"server", | ||
"fake", | ||
"rest", | ||
"api", | ||
"graphql", | ||
"database", | ||
"mock", | ||
"mocking", | ||
"config", | ||
"data" | ||
], | ||
"main": "dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"bin": { | ||
|
@@ -39,86 +56,70 @@ | |
"dist" | ||
], | ||
"engines": { | ||
"node": ">=12" | ||
"node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" | ||
}, | ||
"scripts": { | ||
"prepublishOnly": "git diff --exit-code", | ||
"prepare": "husky install && yarn build", | ||
"prepare": "husky && yarn build", | ||
"build:types": "tsc -p tsconfig.production.json && tsc-alias -p tsconfig.production.json", | ||
"build:swc": "swc bin src index.ts -d dist --extensions .ts --copy-files --ignore **/*.test.ts --ignore bin/templates", | ||
"build:copy-templates": "shx mkdir -p dist/bin/templates/ts && shx cp -r bin/templates/ts dist/bin/templates && shx mkdir -p dist/bin/templates/js && shx cp -r bin/templates/js dist/bin/templates", | ||
"build": "shx rm -rf dist && yarn build:types && yarn build:swc && yarn build:copy-templates", | ||
"start": "yarn build && node ./dist/bin/bin.js", | ||
"dev": "nodemon --watch src --watch bin --watch mock-server.config.* -e js,ts,ejs --exec \"yarn start\"", | ||
"unit-test": "vitest", | ||
"lint": "eslint . --ext .ts --no-error-on-unmatched-pattern --fix", | ||
"lint": "eslint . --fix", | ||
"lint-inspector": "npx @eslint/config-inspector", | ||
"stylelint": "stylelint \"src/static/**/*.css\" --fix", | ||
"format": "prettier --write \"**/*.(ts|js)\"", | ||
"pretty": "yarn format && yarn lint" | ||
}, | ||
"lint-staged": { | ||
"*.css": [ | ||
"stylelint --fix" | ||
], | ||
"*.js": [ | ||
"prettier --write" | ||
], | ||
"*.ts": [ | ||
"prettier --write", | ||
"eslint --no-error-on-unmatched-pattern --fix" | ||
] | ||
}, | ||
"dependencies": { | ||
"@types/body-parser": "^1.19.5", | ||
"@types/express": "^4.17.21", | ||
"@types/flat": "^5.0.5", | ||
"@types/prompts": "^2.4.9", | ||
"@types/yargs": "^17.0.32", | ||
"@types/yargs": "^17.0.33", | ||
"ansi-colors": "^4.1.3", | ||
"body-parser": "^1.20.2", | ||
"body-parser": "^1.20.3", | ||
"ejs": "^3.1.10", | ||
"esbuild": "^0.21.4", | ||
"express": "^4.19.2", | ||
"esbuild": "^0.21.5", | ||
"express": "^4.21.1", | ||
"express-urlrewrite": "^2.0.2", | ||
"flat": "^5.0.2", | ||
"graphql": "^16.8.1", | ||
"graphql": "^16.9.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. У пакета graphql в package.json в свойстве engines.node написано There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Я поставил сразу 14, что думаешь ? |
||
"please-upgrade-node": "^3.2.0", | ||
"prompts": "^2.4.2", | ||
"yargs": "^17.7.2", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@siberiacancode/eslint": "^1.1.1", | ||
"@siberiacancode/eslint": "^2.3.0", | ||
"@siberiacancode/prettier": "^1.1.1", | ||
"@siberiacancode/stylelint": "^1.1.1", | ||
"@siberiacancode/vitest": "^1.2.3", | ||
"@swc/cli": "^0.3.12", | ||
"@swc/core": "^1.5.24", | ||
"@siberiacancode/vitest": "^1.2.4", | ||
"@swc/cli": "^0.4.0", | ||
"@swc/core": "^1.7.36", | ||
"@types/supertest": "^6.0.2", | ||
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.5", | ||
"nodemon": "^3.1.2", | ||
"husky": "^9.1.6", | ||
"lint-staged": "^15.2.10", | ||
"nodemon": "^3.1.7", | ||
"shx": "^0.3.4", | ||
"style-loader": "^4.0.0", | ||
"supertest": "^7.0.0", | ||
"tsc-alias": "^1.8.10", | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.6.3" | ||
}, | ||
"homepage": "https://github.com/siberiacancode/mock-config-server", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/siberiacancode/mock-config-server.git" | ||
}, | ||
"keywords": [ | ||
"server", | ||
"fake", | ||
"REST", | ||
"rest", | ||
"API", | ||
"api", | ||
"mock", | ||
"mocking", | ||
"config", | ||
"data" | ||
] | ||
"lint-staged": { | ||
"*.css": [ | ||
"stylelint --fix" | ||
], | ||
"*.js": [ | ||
"prettier --write" | ||
], | ||
"*.ts": [ | ||
"prettier --write", | ||
"eslint --no-error-on-unmatched-pattern --fix" | ||
] | ||
} | ||
} |
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.
тут был верной json