rclnodejs 0.32.0 → 0.32.1
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 +1 -1
- package/package.json +7 -4
- package/scripts/npmjs-readme.md +1 -1
- package/.gitattributes +0 -117
- package/CONTRIBUTORS.md +0 -63
- package/electron_demo/README.md +0 -54
- package/electron_demo/electron-demo.gif +0 -0
- package/electron_demo/index.html +0 -25
- package/electron_demo/main.js +0 -66
- package/electron_demo/package.json +0 -22
- package/electron_demo/renderer.js +0 -22
- package/eslint.config.mjs +0 -65
- package/suppr.txt +0 -3
- package/types/interfaces.d.ts +0 -4482
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ npm i rclnodejs@x.y.z
|
|
|
45
45
|
|
|
46
46
|
| RCLNODEJS Version | Compatible ROS 2 LTS |
|
|
47
47
|
| :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
48
|
-
| latest version (currently [v0.32.
|
|
48
|
+
| latest version (currently [v0.32.1](https://github.com/RobotWebTools/rclnodejs/tree/0.32.1)) | [Humble](https://github.com/RobotWebTools/rclnodejs/tree/humble-hawksbill)<br>[Jazzy](https://github.com/RobotWebTools/rclnodejs/tree/jazzy) |
|
|
49
49
|
|
|
50
50
|
## Documentation
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rclnodejs",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "ROS2.0 JavaScript client with Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -23,10 +23,11 @@
|
|
|
23
23
|
"install": "npm run rebuild",
|
|
24
24
|
"postinstall": "npm run generate-messages",
|
|
25
25
|
"docs": "cd docs && make",
|
|
26
|
-
"test": "node --expose-gc ./scripts/run_test.js && npx tsd",
|
|
26
|
+
"test": "nyc node --expose-gc ./scripts/run_test.js && npx tsd",
|
|
27
27
|
"lint": "eslint && node ./scripts/cpplint.js",
|
|
28
28
|
"format": "clang-format -i -style=file ./src/*.cpp ./src/*.hpp && prettier --write \"{lib,rosidl_gen,rostsd_gen,rosidl_parser,types,example,test,scripts,benchmark}/**/*.{js,md,ts}\" ./*.{js,md,ts}",
|
|
29
|
-
"prepare": "husky"
|
|
29
|
+
"prepare": "husky",
|
|
30
|
+
"coverage": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
|
|
30
31
|
},
|
|
31
32
|
"bin": {
|
|
32
33
|
"generate-ros-messages": "./scripts/generate_messages.js"
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"@typescript-eslint/parser": "^8.18.0",
|
|
50
51
|
"clang-format": "^1.8.0",
|
|
51
52
|
"commander": "^13.1.0",
|
|
53
|
+
"coveralls": "^3.1.1",
|
|
52
54
|
"deep-equal": "^2.2.3",
|
|
53
55
|
"eslint": "^9.16.0",
|
|
54
56
|
"eslint-config-prettier": "^10.0.2",
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
"jsdoc": "^4.0.4",
|
|
59
61
|
"lint-staged": "^15.2.10",
|
|
60
62
|
"mocha": "^11.0.2",
|
|
61
|
-
"
|
|
63
|
+
"nyc": "^17.1.0",
|
|
62
64
|
"sinon": "^19.0.2",
|
|
63
65
|
"tree-kill": "^1.2.2",
|
|
64
66
|
"tsd": "^0.31.2",
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
"json-bigint": "^1.0.0",
|
|
79
81
|
"nan": "^2.22.0",
|
|
80
82
|
"prettier": "^3.4.2",
|
|
83
|
+
"rimraf": "^6.0.1",
|
|
81
84
|
"walk": "^2.3.15"
|
|
82
85
|
},
|
|
83
86
|
"husky": {
|
package/scripts/npmjs-readme.md
CHANGED
|
@@ -45,7 +45,7 @@ npm i rclnodejs@x.y.z
|
|
|
45
45
|
|
|
46
46
|
| RCLNODEJS Version | Compatible ROS 2 LTS |
|
|
47
47
|
| :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
48
|
-
| latest version (currently [v0.32.
|
|
48
|
+
| latest version (currently [v0.32.1](https://github.com/RobotWebTools/rclnodejs/tree/0.32.1)) | [Humble](https://github.com/RobotWebTools/rclnodejs/tree/humble-hawksbill)<br>[Jazzy](https://github.com/RobotWebTools/rclnodejs/tree/jazzy) |
|
|
49
49
|
|
|
50
50
|
## Documentation
|
|
51
51
|
|
package/.gitattributes
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# Based on https://github.com/alexkaratarakis/gitattributes/blob/master/Web.gitattributes
|
|
2
|
-
|
|
3
|
-
# Auto detect
|
|
4
|
-
## Handle line endings automatically for files detected as
|
|
5
|
-
## text and leave all files detected as binary untouched.
|
|
6
|
-
## This will handle all files NOT defined below.
|
|
7
|
-
* text=auto
|
|
8
|
-
|
|
9
|
-
# Source code
|
|
10
|
-
*.bash text eol=lf
|
|
11
|
-
*.bat text eol=crlf
|
|
12
|
-
*.c text eol=lf
|
|
13
|
-
*.cmd text eol=crlf
|
|
14
|
-
*.cpp text eol=lf
|
|
15
|
-
*.css text diff=css
|
|
16
|
-
*.hpp text eol=lf
|
|
17
|
-
*.htm text diff=html
|
|
18
|
-
*.html text diff=html
|
|
19
|
-
*.inc text
|
|
20
|
-
*.ini text
|
|
21
|
-
*.js text eol=lf
|
|
22
|
-
*.json text eol=lf
|
|
23
|
-
*.jsx text eol=lf
|
|
24
|
-
*.less text
|
|
25
|
-
*.ls text
|
|
26
|
-
*.map text -diff
|
|
27
|
-
*.ps1 text eol=crlf
|
|
28
|
-
*.py text diff=python
|
|
29
|
-
*.sh text eol=lf
|
|
30
|
-
*.ts text eol=lf
|
|
31
|
-
*.tsx text eol=lf
|
|
32
|
-
*.xml text eol=lf
|
|
33
|
-
*.xhtml text diff=html
|
|
34
|
-
|
|
35
|
-
# Templates
|
|
36
|
-
*.em text eol=lf
|
|
37
|
-
|
|
38
|
-
# Docker
|
|
39
|
-
Dockerfile text
|
|
40
|
-
|
|
41
|
-
# Documentation
|
|
42
|
-
*.ipynb text
|
|
43
|
-
*.markdown text diff=markdown
|
|
44
|
-
*.md text diff=markdown
|
|
45
|
-
*.mdwn text diff=markdown
|
|
46
|
-
*.mdown text diff=markdown
|
|
47
|
-
*.mkd text diff=markdown
|
|
48
|
-
*.mkdn text diff=markdown
|
|
49
|
-
*.mdtxt text
|
|
50
|
-
*.mdtext text
|
|
51
|
-
*.txt text
|
|
52
|
-
AUTHORS text
|
|
53
|
-
CHANGELOG text
|
|
54
|
-
CHANGES text
|
|
55
|
-
CONTRIBUTING text
|
|
56
|
-
COPYING text
|
|
57
|
-
copyright text
|
|
58
|
-
*COPYRIGHT* text
|
|
59
|
-
license text
|
|
60
|
-
LICENSE text
|
|
61
|
-
readme text
|
|
62
|
-
*README* text
|
|
63
|
-
TODO text
|
|
64
|
-
|
|
65
|
-
# Configs
|
|
66
|
-
*.cnf text
|
|
67
|
-
*.conf text
|
|
68
|
-
*.config text
|
|
69
|
-
.editorconfig text
|
|
70
|
-
.env text
|
|
71
|
-
.gitattributes text
|
|
72
|
-
.gitconfig text
|
|
73
|
-
.htaccess text
|
|
74
|
-
*.lock text -diff
|
|
75
|
-
*.gyp text
|
|
76
|
-
package.json text eol=lf
|
|
77
|
-
package-lock.json text -diff
|
|
78
|
-
pnpm-lock.yaml text eol=lf -diff
|
|
79
|
-
yarn.lock text -diff
|
|
80
|
-
*.toml text
|
|
81
|
-
*.yaml text eol=lf
|
|
82
|
-
*.yml text eol=lf
|
|
83
|
-
Makefile text
|
|
84
|
-
makefile text
|
|
85
|
-
|
|
86
|
-
# Graphics
|
|
87
|
-
*.bmp binary
|
|
88
|
-
*.gif binary
|
|
89
|
-
*.ico binary
|
|
90
|
-
*.jng binary
|
|
91
|
-
*.jp2 binary
|
|
92
|
-
*.jpg binary
|
|
93
|
-
*.jpeg binary
|
|
94
|
-
*.jpx binary
|
|
95
|
-
*.jxr binary
|
|
96
|
-
*.pdf binary
|
|
97
|
-
*.png binary
|
|
98
|
-
# SVG treated as an asset (binary) by default.
|
|
99
|
-
*.svg text
|
|
100
|
-
# If you want to treat it as binary,
|
|
101
|
-
# use the following line instead.
|
|
102
|
-
# *.svg binary
|
|
103
|
-
*.svgz binary
|
|
104
|
-
*.tif binary
|
|
105
|
-
*.tiff binary
|
|
106
|
-
*.wbmp binary
|
|
107
|
-
*.webp binary
|
|
108
|
-
|
|
109
|
-
# Executables
|
|
110
|
-
*.exe binary
|
|
111
|
-
*.pyc binary
|
|
112
|
-
|
|
113
|
-
# RC files (like .babelrc or .eslintrc)
|
|
114
|
-
*.*rc text
|
|
115
|
-
|
|
116
|
-
# Ignore files (like .npmignore or .gitignore)
|
|
117
|
-
*.*ignore text
|
package/CONTRIBUTORS.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# rclnodejs contributors (sorted alphabetically)
|
|
2
|
-
|
|
3
|
-
- **[Alaa El Jawad](https://github.com/ejalaa12), [Ian McElroy](https://github.com/imcelroy)**
|
|
4
|
-
|
|
5
|
-
- Fix compatibility with ROS2 parameters array types
|
|
6
|
-
- Unit tests for all parameter types
|
|
7
|
-
- Handle concurrent ROS2 client calls, with unit tests
|
|
8
|
-
|
|
9
|
-
- **[Alex Mikhalev](https://github.com/amikhalev)**
|
|
10
|
-
|
|
11
|
-
- Fix build for AMENT_PREFIX_PATH with multiple entries
|
|
12
|
-
|
|
13
|
-
- **[Felix Divo](https://github.com/felixdivo)**
|
|
14
|
-
|
|
15
|
-
- Code cleanup of index.js, tests cases & message generation
|
|
16
|
-
- Improved shutdown behavior
|
|
17
|
-
- Fixed compilation warnings
|
|
18
|
-
|
|
19
|
-
- **[Hanyia](https://github.com/hanyia)**
|
|
20
|
-
|
|
21
|
-
- Benchmark test script
|
|
22
|
-
|
|
23
|
-
- **[Kenny Yuan](https://github.com/kenny-y)**
|
|
24
|
-
|
|
25
|
-
- Message features: JS generation, typed arrays, plain JS object, compound msgs, many others...
|
|
26
|
-
- npm publish scripts
|
|
27
|
-
- Mac support
|
|
28
|
-
|
|
29
|
-
- **[Matt Richard](https://github.com/mattrichard)**
|
|
30
|
-
|
|
31
|
-
- ROS2 Actions
|
|
32
|
-
- Guard conditions
|
|
33
|
-
- Node utility methods (countPublishers/subscribers...)
|
|
34
|
-
- TypeScript improvements
|
|
35
|
-
- Node 12 compatibility
|
|
36
|
-
|
|
37
|
-
- **[Minggang Wang](https://github.com/minggangw)**
|
|
38
|
-
|
|
39
|
-
- Author, lead developer, maintainer
|
|
40
|
-
- Core, CI
|
|
41
|
-
|
|
42
|
-
- **[Martins Mozeiko](https://github.com/martins-mozeiko)**
|
|
43
|
-
|
|
44
|
-
- QoS new/delete fix
|
|
45
|
-
|
|
46
|
-
- **[Qiuzhong](https://github.com/qiuzhong)**
|
|
47
|
-
|
|
48
|
-
- Test coverage for actions, topics, multi-array messages, cross platform, security
|
|
49
|
-
- Converted from setTimeout to ROS2 Timer
|
|
50
|
-
|
|
51
|
-
- **[Teo Koon Peng](https://github.com/koonpeng)**
|
|
52
|
-
|
|
53
|
-
- TypeScript improvements
|
|
54
|
-
- Added Client#waitForService
|
|
55
|
-
- Code style improvements, e.g., Prettier formatting
|
|
56
|
-
- Improved code generation smarts and efficiency
|
|
57
|
-
|
|
58
|
-
- **[Wayne Parrott](https://github.com/wayneparrott)**
|
|
59
|
-
- TypeScript support with interface generation
|
|
60
|
-
- ROS2 parameter support
|
|
61
|
-
- ROS2 lifecycle node
|
|
62
|
-
- Rate class
|
|
63
|
-
- Node class hierarchy
|
package/electron_demo/README.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Rclnodejs Electron demo
|
|
2
|
-
|
|
3
|
-
## Introduction
|
|
4
|
-
|
|
5
|
-
This is a minimal rclnodejs demo using Electron. More information about Electron, please check with [Electron documentation](https://electronjs.org/docs/latest/tutorial/quick-start).
|
|
6
|
-
|
|
7
|
-
The demo includes the following files:
|
|
8
|
-
|
|
9
|
-
- `package.json` - Points to the app's main file and lists its details and dependencies.
|
|
10
|
-
- `main.js` - Introduces the `rclnodejs` native module, starts the app and creates a browser window to render HTML. This is the app's **main process**.
|
|
11
|
-
- `index.html` - Includes a text editor where you can input the the topic to be published. This is the app's **renderer process**.
|
|
12
|
-
- `renderer.js` - Communicate with main process to publish a topic and get it through a subscription.
|
|
13
|
-
|
|
14
|
-
## To run the demo
|
|
15
|
-
|
|
16
|
-
Before starting, please ensure you have installed [nodejs](https://nodejs.org/en).
|
|
17
|
-
|
|
18
|
-
1. Clone this repository.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
git clone https://github.com/RobotWebTools/rclnodejs.git
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
2. Go into the demo.
|
|
25
|
-
```bash
|
|
26
|
-
cd rclnodejs/electron_demo
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
3. [SOURCE THE ROS 2 SETUP FILE](https://docs.ros.org/en/jazzy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files)
|
|
30
|
-
|
|
31
|
-
4. Install dependencies
|
|
32
|
-
```bash
|
|
33
|
-
npm install
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
5. Rebuild rclnodejs for Electron
|
|
37
|
-
```bash
|
|
38
|
-
# Every time you run "npm install", run this:
|
|
39
|
-
./node_modules/.bin/electron-rebuild
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
6. Run the app
|
|
43
|
-
```
|
|
44
|
-
npm start
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If it works, you can see the demo as:
|
|
48
|
-

|
|
49
|
-
|
|
50
|
-
## Resources for Learning Electron
|
|
51
|
-
|
|
52
|
-
- [electronjs.org/docs](https://electronjs.org/docs) - all of Electron's documentation.
|
|
53
|
-
- [Native Node Modules](https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules) - Use a native node module.
|
|
54
|
-
|
|
Binary file
|
package/electron_demo/index.html
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta http-equiv="Content-Security-Policy"
|
|
7
|
-
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
|
|
8
|
-
<title>RCLNODEJS Electron Demo</title>
|
|
9
|
-
</head>
|
|
10
|
-
|
|
11
|
-
<body>
|
|
12
|
-
<div>
|
|
13
|
-
<div style="height: 20px;"></div>
|
|
14
|
-
<div>
|
|
15
|
-
<input id="topic-input"></input>
|
|
16
|
-
<button id="publish-topic">Publish topic</button>
|
|
17
|
-
</div>
|
|
18
|
-
<div style="height: 20px;"></div>
|
|
19
|
-
<span>Received topic:</span>
|
|
20
|
-
<span id="received-topic"></span>
|
|
21
|
-
</div>
|
|
22
|
-
<script src="./renderer.js"></script>
|
|
23
|
-
</body>
|
|
24
|
-
|
|
25
|
-
</html>
|
package/electron_demo/main.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
2
|
-
// you may not use this file except in compliance with the License.
|
|
3
|
-
// You may obtain a copy of the License at
|
|
4
|
-
//
|
|
5
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
//
|
|
7
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
// See the License for the specific language governing permissions and
|
|
11
|
-
// limitations under the License.
|
|
12
|
-
|
|
13
|
-
const { app, BrowserWindow } = require('electron')
|
|
14
|
-
let rclnodejs = require("rclnodejs");
|
|
15
|
-
const { ipcMain } = require('electron');
|
|
16
|
-
|
|
17
|
-
function createWindow() {
|
|
18
|
-
// Create the browser window.
|
|
19
|
-
const mainWindow = new BrowserWindow({
|
|
20
|
-
width: 800,
|
|
21
|
-
height: 600,
|
|
22
|
-
webPreferences: {
|
|
23
|
-
// Add the following two lines in order to use require() in renderer, see details
|
|
24
|
-
// https://stackoverflow.com/questions/44391448/electron-require-is-not-defined
|
|
25
|
-
nodeIntegration: true,
|
|
26
|
-
contextIsolation: false,
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
mainWindow.loadFile('index.html');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// This method will be called when Electron has finished
|
|
34
|
-
// initialization and is ready to create browser windows.
|
|
35
|
-
// Some APIs can only be used after this event occurs.
|
|
36
|
-
app.whenReady().then(() => {
|
|
37
|
-
createWindow();
|
|
38
|
-
rclnodejs.init().then(() => {
|
|
39
|
-
let sender = null;
|
|
40
|
-
const node = rclnodejs.createNode('publisher_example_node');
|
|
41
|
-
node.createSubscription('std_msgs/msg/String', 'topic', (msg) => {
|
|
42
|
-
if (sender) {
|
|
43
|
-
sender.send('topic-received', msg.data);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
const publisher = node.createPublisher('std_msgs/msg/String', 'topic');
|
|
47
|
-
ipcMain.on('publish-topic', (event, topic) => {
|
|
48
|
-
publisher.publish(topic);
|
|
49
|
-
sender = event.sender;
|
|
50
|
-
});
|
|
51
|
-
rclnodejs.spin(node);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
app.on('activate', function () {
|
|
55
|
-
// On macOS it's common to re-create a window in the app when the
|
|
56
|
-
// dock icon is clicked and there are no other windows open.
|
|
57
|
-
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Quit when all windows are closed, except on macOS. There, it's common
|
|
62
|
-
// for applications and their menu bar to stay active until the user quits
|
|
63
|
-
// explicitly with Cmd + Q.
|
|
64
|
-
app.on('window-all-closed', function () {
|
|
65
|
-
if (process.platform !== 'darwin') app.quit()
|
|
66
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rclnodejs-electron-demo",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "A minimal rclnodejs Electron application",
|
|
5
|
-
"main": "main.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "electron ."
|
|
8
|
-
},
|
|
9
|
-
"keywords": [
|
|
10
|
-
"Electron",
|
|
11
|
-
"rclnodejs",
|
|
12
|
-
"demo"
|
|
13
|
-
],
|
|
14
|
-
"license": "Apache",
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"rclnodejs": "^0.27.4"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@electron/rebuild": "^3.6.0",
|
|
20
|
-
"electron": "^31.0.0"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
2
|
-
// you may not use this file except in compliance with the License.
|
|
3
|
-
// You may obtain a copy of the License at
|
|
4
|
-
//
|
|
5
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
//
|
|
7
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
// See the License for the specific language governing permissions and
|
|
11
|
-
// limitations under the License.
|
|
12
|
-
|
|
13
|
-
const { ipcRenderer } = require('electron');
|
|
14
|
-
|
|
15
|
-
ipcRenderer.on('topic-received', function (event, response) {
|
|
16
|
-
document.getElementById('received-topic').innerText = response;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
document.getElementById('publish-topic').addEventListener('click', () => {
|
|
20
|
-
const topic = document.getElementById('topic-input').value;
|
|
21
|
-
ipcRenderer.send('publish-topic', topic);
|
|
22
|
-
});
|
package/eslint.config.mjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
2
|
-
import prettier from "eslint-plugin-prettier";
|
|
3
|
-
import globals from "globals";
|
|
4
|
-
import tsParser from "@typescript-eslint/parser";
|
|
5
|
-
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
6
|
-
import js from "@eslint/js";
|
|
7
|
-
|
|
8
|
-
export default [
|
|
9
|
-
{
|
|
10
|
-
ignores: [
|
|
11
|
-
"eslint.config.mjs",
|
|
12
|
-
"types/interfaces.d.ts",
|
|
13
|
-
"test/types/index.test-d.ts",
|
|
14
|
-
"**/generated/",
|
|
15
|
-
"**/scripts/",
|
|
16
|
-
"**/benchmark/",
|
|
17
|
-
"**/docs/",
|
|
18
|
-
"**/electron_demo/",
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
...js.configs.recommended,
|
|
23
|
-
files: ["lib/**/*.js", "index.js"],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
rules: {
|
|
27
|
-
'no-dupe-class-members': 'off',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
plugins: {
|
|
32
|
-
"@typescript-eslint": typescriptEslint,
|
|
33
|
-
},
|
|
34
|
-
languageOptions: {
|
|
35
|
-
globals: {
|
|
36
|
-
...globals.node,
|
|
37
|
-
},
|
|
38
|
-
parser: tsParser,
|
|
39
|
-
ecmaVersion: "latest",
|
|
40
|
-
sourceType: "module",
|
|
41
|
-
},
|
|
42
|
-
files: ['types/*.d.ts'],
|
|
43
|
-
rules: {
|
|
44
|
-
...typescriptEslint.configs.recommended.rules,
|
|
45
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
plugins: {
|
|
50
|
-
prettier,
|
|
51
|
-
},
|
|
52
|
-
languageOptions: {
|
|
53
|
-
globals: {
|
|
54
|
-
...globals.node,
|
|
55
|
-
},
|
|
56
|
-
ecmaVersion: "latest",
|
|
57
|
-
sourceType: "commonjs",
|
|
58
|
-
},
|
|
59
|
-
files: ["lib/**/*.js", "rosidl_parser/**/*.js", "rosidl_gen/**/*.js",
|
|
60
|
-
"rostsd_gen/**/*.js", "test/**/*.js", "example/**/*.js", "index.js"],
|
|
61
|
-
rules: {
|
|
62
|
-
...eslintPluginPrettierRecommended.rules,
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
];
|
package/suppr.txt
DELETED