-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linting: Update linter to enforce ES 2018 features (#25470)
* Separate Out eslintConfig move eslintConfig to its own file to keep package.json clean modifications and commits not bound to or carry the risk of dependency changes. This commit is the equivalent configuration as the starting point. * Update Three.js Convert ES 2020 imports into 2018. * Update .eslintrc.json Set project to ES 2018 * Add Public Interface Export Objects MathUtils, AnimationUtils, and DataUtils need to be updated to export their namespaces. Privately, individual functions are exported to support the other parts of the library, publicly they are namespaced with an object wrapper.
- Loading branch information
Showing
6 changed files
with
111 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es2018": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"mdcs", | ||
"plugin:compat/recommended" | ||
], | ||
"plugins": [ | ||
"html", | ||
"import" | ||
], | ||
"settings": { | ||
"polyfills": [ | ||
"WebGL2RenderingContext" | ||
] | ||
}, | ||
"globals": { | ||
"__THREE_DEVTOOLS__": "readonly", | ||
"potpack": "readonly", | ||
"fflate": "readonly", | ||
"OIMO": "readonly", | ||
"Stats": "readonly", | ||
"XRWebGLBinding": "readonly", | ||
"XRWebGLLayer": "readonly", | ||
"GPUShaderStage": "readonly", | ||
"GPUBufferUsage": "readonly", | ||
"GPUTextureUsage": "readonly", | ||
"GPUMapMode": "readonly", | ||
"QUnit": "readonly", | ||
"Ammo": "readonly", | ||
"XRRigidTransform": "readonly", | ||
"XRMediaBinding": "readonly", | ||
"CodeMirror": "readonly", | ||
"esprima": "readonly", | ||
"jsonlint": "readonly" | ||
}, | ||
"rules": { | ||
"no-throw-literal": [ | ||
"error" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"prefer-const": [ | ||
"error", | ||
{ | ||
"destructuring": "any", | ||
"ignoreReadBeforeAssign": false | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters