Skip to content

Commit 15bdf5a

Browse files
Razicanjedel1043
andauthored
Added Prettier, ESLint & updated dependencies (#130)
* Updated dependencies, added ESLint & Prettier * Added empty lines at end of files * Removed no-longer-needed comment * Added type checking to linting * Added Docusaurus types to lock file * Update docusaurus.config.ts Co-authored-by: José Julián Espina <[email protected]>
1 parent ce4fe2b commit 15bdf5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2572
-1401
lines changed

.eslintignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

.eslintrc.cjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
root: true,
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:@docusaurus/recommended",
7+
"prettier",
8+
],
9+
parser: "@typescript-eslint/parser",
10+
plugins: ["@typescript-eslint"],
11+
parserOptions: {
12+
sourceType: "module",
13+
ecmaVersion: 2020,
14+
},
15+
env: {
16+
browser: true,
17+
es2017: true,
18+
node: true,
19+
},
20+
};

.prettierignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
33
};

blog/2021-01-14-boa-release-11/index.mdx

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ Previously many tests failed to run as the test-runner was still being worked on
3333

3434
For live tracking of conformance tests you can check [here](https://boa-dev.github.io/boa/test262/). Below is a snapshot of the previous version and today.
3535

36-
<div className="row" style={{ display: "flex", justifyContent: "space-around" }}>
36+
<div
37+
className="row"
38+
style={{ display: "flex", justifyContent: "space-around" }}
39+
>
3740
<section className="col-md-4" id="version-latest">
3841
<div className="card">
3942
<div className="card-body" style={{ padding: "10px" }}>

blog/2021-09-30-boa-release-13.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This release brings support for the relative indexing method [String.prototype.a
3131
const sentence = "The quick brown fox jumps over the lazy dog.";
3232
let index = 5;
3333
console.log(
34-
`Using an index of ${index} the character returned is ${sentence.at(index)}`
34+
`Using an index of ${index} the character returned is ${sentence.at(index)}`,
3535
);
3636
// expected output: "Using an index of 5 the character returned is u"
3737
```

blog/2024-02-29-boa-release-18/index.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ author: Boa Developers
77

88
## Summary
99

10-
Boa v0.18 is now available! After 7 months of development we are very happy to present you the latest release of the Boa JavaScript engine. Boa makes it easy to
11-
embed a JS engine in your projects, and you can even use it from WebAssembly. See the [about](/about) page for more info.
10+
Boa v0.18 is now available! After 7 months of development we are very happy to present you the latest release of the Boa
11+
JavaScript engine. Boa makes it easy to embed a JS engine in your projects, and you can even use it from WebAssembly.
12+
See the [about](/about) page for more info.
1213

1314
In this release, our conformance has grown from 78.74% to 84.64% in the official ECMAScript Test Suite (Test262). While
1415
this might look as a small increase, we now pass **6,079** more tests than in the previous version. In any case, the big
@@ -35,12 +36,14 @@ Furthermore, we now have a new domain for Boa, [boajs.dev][boajs].
3536

3637
### We're on [test262.fyi](https://test262.fyi/)!
3738

38-
Thanks to the amazing work of [CanadaHonk](https://twitter.com/CanadaHonk), Boa is now listed on [test262.fyi](https://test262.fyi/). This is a great achievement for us and we are very proud to be listed alongside other major JavaScript engines. It should be much easier for users to compare Boa's conformance tests with other engines.
39+
Thanks to the amazing work of [CanadaHonk](https://twitter.com/CanadaHonk), Boa is now listed on
40+
[test262.fyi](https://test262.fyi/). This is a great achievement for us and we are very proud to be listed alongside
41+
other major JavaScript engines. It should be much easier for users to compare Boa's conformance tests with other engines.
3942

4043
<div class="conformance_set">
4144

42-
![conformance](./conformance_dark.png)
43-
![conformance_time](./conformance_time_dark.png)
45+
<!-- ![conformance](./conformance_dark.png)
46+
![conformance_time](./conformance_time_dark.png) -->
4447

4548
</div>
4649

docs/architecture/_category_.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"link": {
55
"type": "generated-index"
66
}
7-
}
7+
}

docs/architecture/overview.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
sidebar_position: 1
33
---
4+
45
# Overview
56

67
Boa is a compiled and interpretted ECMAScript/JS engine.

docs/contributing/_category_.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"link": {
55
"type": "generated-index"
66
}
7-
}
7+
}

docs/debugging/_category_.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"link": {
55
"type": "generated-index"
66
}
7-
}
7+
}

docs/debugging/debug_intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sidebar_position: 1
66

77
There are various tools and methods provided to assist with debugging Boa.
88

9-
We are always looking for new methods of debugging. If there is one that you think would be useful, please feel free to submit an issue and/or pull request.
9+
We are always looking for new methods of debugging. If there is one that you think would be useful, please feel free to submit an issue and/or pull request.

docs/debugging/debug_object.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ it accessible to Boa when the source code is executed.
2020

2121
The debug object currently has the below modules implemented:
2222

23-
* [`gc`](./debug_object#boagc)
24-
* [`function`](./debug_object#boafunction)
25-
* [`object`](./debug_object#boaobject)
26-
* [`optimizer`](./debug_object#boaoptimizer)
27-
* [`realm`](./debug_object#boarealm)
28-
* [`shape`](./debug_object#boashape)
29-
* [`limits`](./debug_object#boalimits)
23+
- [`gc`](./debug_object#boagc)
24+
- [`function`](./debug_object#boafunction)
25+
- [`object`](./debug_object#boaobject)
26+
- [`optimizer`](./debug_object#boaoptimizer)
27+
- [`realm`](./debug_object#boarealm)
28+
- [`shape`](./debug_object#boashape)
29+
- [`limits`](./debug_object#boalimits)
3030

3131
If there is any functionality currently missing that you think may be helpful, please feel free to submit an issue or Pull Request!
3232

docs/debugging/debug_other.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
sidebar_position: 6
33
---
4+
45
# Debuggers
56

67
There are also other methods of debugging listed below.
@@ -20,4 +21,4 @@ rust-lldb ./target/debug/boa [arguments]
2021
```
2122

2223
[remote_containers]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
23-
[blog_debugging]: https://jason-williams.co.uk/debugging-rust-in-vscode
24+
[blog_debugging]: https://jason-williams.co.uk/debugging-rust-in-vscode

docs/debugging/debug_trace.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ main:
105105
00014: InitGLexical "b" # 2
106106
00019: Pop #
107107
00020: GetGName "dis" # dis
108-
```
108+
```

docs/intro.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Boa also exists to serve as a Rust implementation of the EcmaScript specificatio
1010

1111
Boa currently publishes the following crates:
1212

13-
* boa_ast - Boa’s ECMAScript Abstract Syntax Tree.
14-
* boa_engine - Boa’s implementation of ECMAScript builtin objects and execution.
15-
* boa_gc - Boa’s garbage collector.
16-
* boa_interner - Boa’s string interner.
17-
* boa_parser - Boa’s lexer and parser.
18-
* boa_profiler - Boa’s code profiler.
19-
* boa_icu_provider - Boa’s ICU4X data provider.
20-
* boa_runtime - Boa’s WebAPI features.
13+
- boa_ast - Boa’s ECMAScript Abstract Syntax Tree.
14+
- boa_engine - Boa’s implementation of ECMAScript builtin objects and execution.
15+
- boa_gc - Boa’s garbage collector.
16+
- boa_interner - Boa’s string interner.
17+
- boa_parser - Boa’s lexer and parser.
18+
- boa_profiler - Boa’s code profiler.
19+
- boa_icu_provider - Boa’s ICU4X data provider.
20+
- boa_runtime - Boa’s WebAPI features.
2121

2222
The goal of the following documentation is to provide a reference guide for the current design of Boa and it's most current features.
2323

docs/optimizations/_category_.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"link": {
55
"type": "generated-index"
66
}
7-
}
7+
}

docs/profiling.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,29 @@ This is the same as above except instead of calling `$ crox my_trace` you call `
3737

3838
```md
3939
+---------------------------------------+-----------+-----------------+----------+------------+
40-
| Item | Self time | % of total time | Time | Item count |
40+
| Item | Self time | % of total time | Time | Item count |
4141
+---------------------------------------+-----------+-----------------+----------+------------+
42-
| From<Object> | 1.04ms | 14.776 | 1.04ms | 146 |
42+
| From<Object> | 1.04ms | 14.776 | 1.04ms | 146 |
4343
+---------------------------------------+-----------+-----------------+----------+------------+
44-
| new_object | 356.50µs | 5.082 | 533.50µs | 18 |
44+
| new_object | 356.50µs | 5.082 | 533.50µs | 18 |
4545
+---------------------------------------+-----------+-----------------+----------+------------+
46-
| create_instrinsics | 263.50µs | 3.756 | 6.38ms | 1 |
46+
| create_instrinsics | 263.50µs | 3.756 | 6.38ms | 1 |
4747
+---------------------------------------+-----------+-----------------+----------+------------+
48-
| make_builtin_fn: toString | 218.50µs | 3.114 | 290.50µs | 12 |
48+
| make_builtin_fn: toString | 218.50µs | 3.114 | 290.50µs | 12 |
4949
+---------------------------------------+-----------+-----------------+----------+------------+
50-
| Value::get_field | 178.60µs | 2.546 | 340.20µs | 60 |
50+
| Value::get_field | 178.60µs | 2.546 | 340.20µs | 60 |
5151
+---------------------------------------+-----------+-----------------+----------+------------+
52-
| Value::get_property | 161.60µs | 2.303 | 161.60µs | 60 |
52+
| Value::get_property | 161.60µs | 2.303 | 161.60µs | 60 |
5353
+---------------------------------------+-----------+-----------------+----------+------------+
54-
| lex | 135.60µs | 1.933 | 135.60µs | 1 |
54+
| lex | 135.60µs | 1.933 | 135.60µs | 1 |
5555
+---------------------------------------+-----------+-----------------+----------+------------+
56-
| math:create | 125.40µs | 1.787 | 1.11ms | 1 |
56+
| math:create | 125.40µs | 1.787 | 1.11ms | 1 |
5757
+---------------------------------------+-----------+-----------------+----------+------------+
58-
| Value::set_field | 100.20µs | 1.428 | 262.80µs | 8 |
58+
| Value::set_field | 100.20µs | 1.428 | 262.80µs | 8 |
5959
+---------------------------------------+-----------+-----------------+----------+------------+
60-
| function::builtin | 82.40µs | 1.175 | 82.40µs | 146 |
60+
| function::builtin | 82.40µs | 1.175 | 82.40µs | 146 |
6161
+---------------------------------------+-----------+-----------------+----------+------------+
62-
| String | 81.60µs | 1.163 | 961.60µs | 1 |
62+
| String | 81.60µs | 1.163 | 961.60µs | 1 |
6363
+---------------------------------------+-----------+-----------------+----------+------------+
6464
```
6565

0 commit comments

Comments
 (0)