2
0
Эх сурвалжийг харах

Package.json: Added "lint-fix" script (#20033)

* add --fix parameter for eslint

* removing --fix comment

* new script
DefinitelyMaybe 5 жил өмнө
parent
commit
c9a83cdb1c

+ 0 - 7
.github/CONTRIBUTING.md

@@ -56,13 +56,6 @@ The next most important script runs all the appropriate testing.
 The linting is there to keep a consistent code-style across the all of the code and the testing is
 there to help catch bugs and check that the code behaves as expected. It is important that
 neither of these steps comes up with any errors due to your changes.
-* If you’d like the linter to fix any errors that it can change, make the following addition to the “test-lint” script.
-        
-        {
-        ...
-        "test-lint": "eslint src --ext js --ext ts --fix && tsc -p utils/build/tsconfig.lint.json"
-        ...
-        }
 
 If you’d like to make a minified version of the build files i.e. ‘build/three.min.js’ run:
         

+ 1 - 0
package.json

@@ -58,6 +58,7 @@
     "build-closure": "rollup -c utils/build/rollup.config.js && google-closure-compiler --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
     "dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"http-server -c-1 -p 8080\"",
     "dev-test": "concurrently --names \"ROLLUP,ROLLUPTEST,HTTP\" -c \"bgBlue.bold,bgRed.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"npm run dev --prefix test\" \"http-server -p 8080\"",
+    "lint-fix": "eslint src --ext js --ext ts --fix && eslint examples/jsm --ext js --ext ts --ignore-pattern libs --fix",
     "lint-docs": "eslint docs --ext html",
     "lint-examples": "eslint examples/jsm --ext js --ext ts --ignore-pattern libs && tsc -p utils/build/tsconfig-examples.lint.json",
     "test-lint": "eslint src --ext js --ext ts && tsc -p utils/build/tsconfig.lint.json",