From d1897c79c3a39005660420e5586d2178e5f99f9d Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 03:36:29 -0400 Subject: [PATCH] Again --- .eslintrc.js | 86 +++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 2 +- package-lock.json | 57 -------------------- package.json | 101 +++-------------------------------- 4 files changed, 94 insertions(+), 152 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..c51d7b9c --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,86 @@ +module.exports = { + 'extends': [ + 'react-app', + 'react-app/jest' + ], + 'rules': { + 'linebreak-style': [ + 'off' + ], + 'quotes': [ + 'error', + 'single' + ], + 'brace-style': [ + 'error', + 'allman', + { + 'allowSingleLine': true + } + ], + 'object-curly-spacing': [ + 'error', + 'always' + ], + 'keyword-spacing': [ + 'error', + { + 'overrides': { + 'if': { + 'after': false + }, + 'for': { + 'after': false + }, + 'while': { + 'after': false + }, + 'switch': { + 'after': false + } + } + } + ], + '@typescript-eslint/no-explicit-any': [ + 'off' + ], + '@typescript-eslint/ban-ts-comment': [ + 'off' + ], + '@typescript-eslint/no-empty-function': [ + 'error', + { + 'allow': [ + 'functions', + 'arrowFunctions', + 'generatorFunctions', + 'methods', + 'generatorMethods', + 'constructors' + ] + } + ], + '@typescript-eslint/no-unused-vars': [ + 'off' + ], + '@typescript-eslint/ban-types': [ + 'error', + { + 'types': { + 'String': true, + 'Boolean': true, + 'Number': true, + 'Symbol': true, + '{}': false, + 'Object': false, + 'object': false, + 'Function': false + }, + 'extendDefaults': true + } + ], + 'no-switch-case-fall-through': [ + 'off' + ] + } + } diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d960239c..78318e26 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev npm i - node node_modules/@craco/craco/bin/craco.js --max_old_space_size=4096 build + npm run build:prod - name: Archive Artifacts uses: actions/upload-artifact@v2 with: diff --git a/package-lock.json b/package-lock.json index 0f2a0fe4..9effa8d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1152,55 +1152,6 @@ "minimist": "^1.2.0" } }, - "@craco/craco": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@craco/craco/-/craco-6.3.0.tgz", - "integrity": "sha512-SCnfEQxT/6NAbU/3sIWw7gQXtzjjiTp/EZFdJTd8inPURILIy0YajrC2p8qBG2KhFo5cwgOrEDyaGyAFvvuyuA==", - "requires": { - "cross-spawn": "^7.0.0", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "webpack-merge": "^4.2.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "@csstools/convert-colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz", @@ -18859,14 +18810,6 @@ } } }, - "webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", - "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", - "requires": { - "lodash": "^4.17.15" - } - }, "webpack-sources": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", diff --git a/package.json b/package.json index bd043db6..e523d8f4 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,14 @@ "name": "nitro-react", "version": "0.1.0", "private": true, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts --max_old_space_size=4096 build", + "build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, "dependencies": { - "@craco/craco": "^6.3.0", "@nitrots/nitro-renderer": "file:../nitro-renderer", "animate.css": "^4.1.1", "classnames": "^2.3.1", @@ -18,99 +24,6 @@ "typescript": "^4.3.5", "web-vitals": "^1.1.2" }, - "scripts": { - "start": "craco start", - "build": "craco build", - "build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build", - "test": "craco test", - "eject": "react-scripts eject" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ], - "rules": { - "linebreak-style": [ - "off" - ], - "quotes": [ - "error", - "single" - ], - "brace-style": [ - "error", - "allman", - { - "allowSingleLine": true - } - ], - "object-curly-spacing": [ - "error", - "always" - ], - "keyword-spacing": [ - "error", - { - "overrides": { - "if": { - "after": false - }, - "for": { - "after": false - }, - "while": { - "after": false - }, - "switch": { - "after": false - } - } - } - ], - "@typescript-eslint/no-explicit-any": [ - "off" - ], - "@typescript-eslint/ban-ts-comment": [ - "off" - ], - "@typescript-eslint/no-empty-function": [ - "error", - { - "allow": [ - "functions", - "arrowFunctions", - "generatorFunctions", - "methods", - "generatorMethods", - "constructors" - ] - } - ], - "@typescript-eslint/no-unused-vars": [ - "off" - ], - "@typescript-eslint/ban-types": [ - "error", - { - "types": { - "String": true, - "Boolean": true, - "Number": true, - "Symbol": true, - "{}": false, - "Object": false, - "object": false, - "Function": false - }, - "extendDefaults": true - } - ], - "no-switch-case-fall-through": [ - "off" - ] - } - }, "devDependencies": { "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^11.2.7",