GramJs: Add ESLint

This commit is contained in:
Alexander Zinchuk 2021-05-08 22:41:25 +03:00
parent 559ef6a53b
commit 5f4a210d7b
4 changed files with 32 additions and 2 deletions

View File

@ -1 +1 @@
src/lib/gramjs/*
src/lib/gramjs

View File

@ -11,8 +11,9 @@
"deploy:production": "npm run build:production && git add -A && git commit -a -m '[Build]' && git push",
"perf:serve": "APP_ENV=perf parcel src/index-perf.html",
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"lint:fix": "npm run lint -- --fix",
"gramjs:tl": "node ./src/lib/gramjs/tl/generateModules.js",
"gramjs:lint:fix": "eslint ./src/lib/gramjs --ignore-path=src/lib/gramjs/.eslintignore --fix",
"test": "APP_ENV=test jest --verbose --forceExit"
},
"engines": {

View File

@ -0,0 +1,4 @@
src/lib/gramjs/tl/types-generator/template.js
src/lib/gramjs/tl/api.d.ts
src/lib/gramjs/tl/apiTl.js
src/lib/gramjs/tl/schemaTl.js

25
src/lib/gramjs/.eslintrc Normal file
View File

@ -0,0 +1,25 @@
{
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"@typescript-eslint/indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"max-len": [
"error",
120
],
"no-bitwise": "off",
"no-underscore-dangle": "off",
"no-null/no-null": "off"
}
}