From ccc7c59ac825fd34ad6f4165af110f41892ccbd0 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Thu, 25 Mar 2021 21:35:11 -0700 Subject: [PATCH] chore: Nx 11.5 and @nativescript/eslint-plugin --- .eslintrc.json | 66 ++++++------------------------------ package.json | 15 ++++---- packages/core/.eslintrc.json | 19 ++++++++++- packages/core/package.json | 2 +- 4 files changed, 38 insertions(+), 64 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6921290df..3cbbb9c6d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,57 +1,13 @@ { - "root": true, - "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "extends": ["plugin:prettier/recommended"], - "parserOptions": { - "project": ["packages/core/tsconfig.json", "packages/webpack/tsconfig.json"] - }, - "plugins": ["prettier"], - "rules": { - "prettier/prettier": "warn", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/triple-slash-reference": "off", - "no-prototype-builtins": "off", - "no-inner-declarations": "off", - "no-constant-condition": "off", - "no-useless-escape": "off", - "@nrwl/nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ - { - "sourceTag": "*", - "onlyDependOnLibsWithTags": ["*"] - } - ] - } - ] - } - }, - { - "files": ["*.ts", "*.tsx"], - "extends": ["plugin:@nrwl/nx/typescript"], - "parserOptions": { - "project": "./tsconfig.*?.json" - }, - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nrwl/nx/javascript"], - "rules": {} - } - ] + "parser": "@typescript-eslint/parser", + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 2015 + }, + "plugins": ["@nativescript"], + "rules": { + "@nativescript/no-nativescript-angular-imports": "warn", + "@nativescript/no-tns-core-modules-imports": "warn", + "@nativescript/no-duplicate-ns-imports": "warn" + } } diff --git a/package.json b/package.json index 017f0267e..015cddb33 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,14 @@ "nativescript-theme-core": "^1.0.4" }, "devDependencies": { + "@nativescript/eslint-plugin": "0.0.1", "@nativescript/hook": "^2.0.0", - "@nrwl/cli": "11.4.0", - "@nrwl/eslint-plugin-nx": "11.4.0", - "@nrwl/jest": "11.4.0", - "@nrwl/node": "11.4.0", - "@nrwl/tao": "11.4.0", - "@nrwl/workspace": "11.4.0", + "@nrwl/cli": "11.5.2", + "@nrwl/eslint-plugin-nx": "11.5.2", + "@nrwl/jest": "11.5.2", + "@nrwl/node": "11.5.2", + "@nrwl/tao": "11.5.2", + "@nrwl/workspace": "11.5.2", "@nstudio/focus": "~11.1.0", "@nstudio/nps-i": "~1.1.0", "@prettier/plugin-xml": "^0.13.1", @@ -43,7 +44,7 @@ "css-tree": "^1.0.0-alpha.39", "dotenv": "~8.2.0", "eslint": "~7.21.0", - "eslint-config-prettier": "~8.1.0", + "eslint-config-prettier": "8.1.0", "eslint-plugin-prettier": "^3.3.1", "gonzales": "^1.0.7", "husky": "^5.1.3", diff --git a/packages/core/.eslintrc.json b/packages/core/.eslintrc.json index ffd3c2927..9ef20ddd5 100644 --- a/packages/core/.eslintrc.json +++ b/packages/core/.eslintrc.json @@ -1,5 +1,22 @@ { "extends": "../../.eslintrc", "rules": {}, - "ignorePatterns": ["!**/*"] + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "parserOptions": { + "project": ["packages/core/tsconfig.*?.json"] + }, + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] } diff --git a/packages/core/package.json b/packages/core/package.json index b5eecc11b..682274da7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,7 +3,7 @@ "main": "index", "types": "index.d.ts", "description": "NativeScript Core Modules", - "version": "8.0.0-alpha.4", + "version": "8.0.0-alpha.5", "homepage": "https://nativescript.org", "repository": { "type": "git",