@xperimntl/eslint-plugin-vue-threejs 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @xperimntl/eslint-plugin-vue-threejs
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/@xperimntl/eslint-plugin-vue-threejs)
|
|
4
|
+
[](https://twitter.com/pmndrs)
|
|
5
|
+
[](https://discord.gg/ZZjjNvJ)
|
|
6
|
+
[](https://opencollective.com/vue-three-fiber)
|
|
7
|
+
[](https://blockchain.com/eth/address/0x6E3f79Ea1d0dcedeb33D3fC6c34d2B1f156F2682)
|
|
8
|
+
[](https://blockchain.com/btc/address/36fuguTPxGCNnYZSRdgdh6Ea94brCAjMbH)
|
|
9
|
+
|
|
10
|
+
An ESLint plugin which provides lint rules for [@xperimntl/vue-threejs](https://github.com/chris-xperimntl/vue-threejs).
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @xperimntl/eslint-plugin-vue-threejs --save-dev
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Configuration
|
|
19
|
+
|
|
20
|
+
Use the recommended [config](#recommended) to get reasonable defaults:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
"extends": [
|
|
24
|
+
"plugin:@xperimntl/vue-threejs/recommended"
|
|
25
|
+
]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
If you do not use a config you will need to specify individual rules and add extra configuration.
|
|
29
|
+
|
|
30
|
+
Add "@xperimntl/vue-three" to the plugins section.
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
"plugins": [
|
|
34
|
+
"@xperimntl/vue-three"
|
|
35
|
+
]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Enable the rules that you would like to use.
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
"rules": {
|
|
42
|
+
"@xperimntl/vue-threejs/no-clone-in-frame-loop": "error"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
|
|
48
|
+
✅ Enabled in the `recommended` [configuration](#recommended).<br>
|
|
49
|
+
🔧 Automatically fixable by the `--fix` [CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).<br>
|
|
50
|
+
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
|
|
51
|
+
|
|
52
|
+
<!-- START_RULE_CODEGEN -->
|
|
53
|
+
<!-- @command yarn codegen:eslint -->
|
|
54
|
+
|
|
55
|
+
| Rule | Description | ✅ | 🔧 | 💡 |
|
|
56
|
+
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | --- | --- | --- |
|
|
57
|
+
| <a href="./docs/rules/no-clone-in-loop.md">no-clone-in-loop</a> | Disallow cloning vectors in the frame loop which can cause performance problems. | ✅ | | |
|
|
58
|
+
| <a href="./docs/rules/no-new-in-loop.md">no-new-in-loop</a> | Disallow instantiating new objects in the frame loop which can cause performance problems. | ✅ | | |
|
|
59
|
+
|
|
60
|
+
<!-- END_CODEGEN -->
|
|
61
|
+
|
|
62
|
+
## Shareable configs
|
|
63
|
+
|
|
64
|
+
### Recommended
|
|
65
|
+
|
|
66
|
+
This plugin exports a `recommended` configuration that enforces rules appropriate for everyone using Vue Three Fiber.
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
"extends": [
|
|
70
|
+
"plugin:@xperimntl/vue-threejs/recommended"
|
|
71
|
+
]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### All
|
|
75
|
+
|
|
76
|
+
This plugin also exports an `all` configuration that includes every available rule.
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
"extends": [
|
|
80
|
+
"plugin:@xperimntl/vue-threejs/all"
|
|
81
|
+
]
|
|
82
|
+
```
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from "../src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieHBlcmltbnRsLWVzbGludC1wbHVnaW4tdnVlLXRocmVlanMuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file might look strange and you might be wondering what it's for
|
|
3
|
+
// it's lets you import your source files by importing this entrypoint
|
|
4
|
+
// as you would import it if it was built with preconstruct build
|
|
5
|
+
// this file is slightly different to some others though
|
|
6
|
+
// it has a require hook which compiles your code with Babel
|
|
7
|
+
// this means that you don't have to set up @babel/register or anything like that
|
|
8
|
+
// but you can still require this module and it'll be compiled
|
|
9
|
+
|
|
10
|
+
// this bit of code imports the require hook and registers it
|
|
11
|
+
let unregister = require("../../../node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", "..");
|
|
12
|
+
|
|
13
|
+
// this re-exports the source file
|
|
14
|
+
module.exports = require("../src/index.ts");
|
|
15
|
+
|
|
16
|
+
unregister();
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xperimntl/eslint-plugin-vue-threejs",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "ESLint rules for @xperimntl/vue-threejs.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"renderer",
|
|
8
|
+
"fiber",
|
|
9
|
+
"three",
|
|
10
|
+
"threejs",
|
|
11
|
+
"eslint"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/chris-xperimntl/vue-threejs/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/chris-xperimntl/vue-threejs/tree/master/packages/eslint-plugin#readme",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/chris-xperimntl/vue-threejs.git"
|
|
21
|
+
},
|
|
22
|
+
"main": "dist/xperimntl-eslint-plugin-vue-threejs.cjs.js",
|
|
23
|
+
"module": "dist/xperimntl-eslint-plugin-vue-threejs.esm.js",
|
|
24
|
+
"types": "dist/xperimntl-eslint-plugin-vue-threejs.cjs.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"preconstruct": {
|
|
30
|
+
"entrypoints": [
|
|
31
|
+
"index.ts"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@babel/runtime": "^7.29.2",
|
|
36
|
+
"eslint": "^8.12.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/eslint": "^8.4.10",
|
|
40
|
+
"@types/lodash": "^4.17.24",
|
|
41
|
+
"lodash": "^4.17.19",
|
|
42
|
+
"prettier": "^2.6.1",
|
|
43
|
+
"ts-node": "^10.9.1"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"codegen": "ts-node scripts/codegen.ts"
|
|
47
|
+
}
|
|
48
|
+
}
|