mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: some eslint fixes (#9178)
* add `eslint-plugin-prettier` so that eslint can format code too * fixed eslint config file: - wrong “prettier” extend - added config for eslint/prettier * allow eslint/prettier to format JSON files except package.json files (which are formatted by npm)
This commit is contained in:
@@ -7,9 +7,15 @@
|
||||
"project": ["packages/core/tsconfig.json", "packages/webpack/tsconfig.json"]
|
||||
},
|
||||
"ignorePatterns": ["**/*"],
|
||||
"plugins": ["@typescript-eslint", "@nrwl/nx"],
|
||||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"],
|
||||
"plugins": ["prettier", "@typescript-eslint", "@nrwl/nx"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier/@typescript-eslint",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": "warn",
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/no-parameter-properties": "off",
|
||||
|
||||
@@ -16,7 +16,7 @@ packages/ui-mobile-base
|
||||
tools/assets/App_Resources
|
||||
*.cmd
|
||||
*.md
|
||||
*.json
|
||||
package.json
|
||||
*.js
|
||||
*.map
|
||||
*.css
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
"dotenv": "~8.2.0",
|
||||
"eslint": "~7.10.0",
|
||||
"eslint-config-prettier": "~6.11.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"gonzales": "^1.0.7",
|
||||
"husky": "^4.2.5",
|
||||
"jest": "~26.2.2",
|
||||
|
||||
Reference in New Issue
Block a user