Skip to content

Commit 84125a6

Browse files
committed
Lint
1 parent f2358f2 commit 84125a6

Some content is hidden

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

42 files changed

+145
-135
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ pnpm dev
2323
## License
2424

2525
MIT (c) Cezar Augusto and the Extension.js authors.
26-
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
sort: 1
3-
43
---
54

6-
TODO
7-
---
5+
## TODO
86

97
**🧩 Extension** • create cross-browser extensions with no build configuration.

_WIP_Advanced/Usage Via NodeJS API.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
sort: 3
3-
4-
---
5-
TODO
63
---
74

5+
## TODO
6+
87
**🧩 Extension** • create cross-browser extensions with no build configuration.

_WIP_Configuration Files/Babel.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ To allow developers to use the latest language features without worrying about b
88

99
Here’s how each Babel plugin and preset contributes to this feature:
1010

11-
* [@babel/plugin-proposal-decorators](https://www.npmjs.com/package/@babel/plugin-proposal-decorators): Allows developers to use decorators in their code, providing a convenient and readable way to annotate and modify classes and properties at design time.
12-
* [@babel/plugin-syntax-dynamic-import](https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import): Enables the use of dynamic import() syntax, facilitating code-splitting and lazy-loading of modules, which can significantly improve the performance of web applications.
13-
* [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env): Automatically determines the Babel plugins and polyfills needed based on the target environment's feature support, ensuring that the output code runs efficiently across all platforms.
14-
* [@babel/preset-react](https://www.npmjs.com/package/@babel/preset-react): Transforms JSX into standard JavaScript, making it compatible with the browser and enabling the use of React's powerful UI library and its ecosystem.
15-
* [@babel/preset-typescript](https://www.npmjs.com/package/@babel/preset-typescript): Provides support for TypeScript, allowing developers to leverage type-safe programming, interfaces, and other TypeScript features, which are compiled down to standard JavaScript.
16-
* [babel-plugin-react-require](https://www.npmjs.com/package/babel-plugin-react-require): Automatically injects the React import statement in files that use JSX, ensuring that the React namespace is always available where needed.
17-
* [babel-plugin-transform-react-remove-prop-types](https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types): Removes PropTypes from the production build of React components, reducing the bundle size and improving the performance of the production app.
11+
- [@babel/plugin-proposal-decorators](https://www.npmjs.com/package/@babel/plugin-proposal-decorators): Allows developers to use decorators in their code, providing a convenient and readable way to annotate and modify classes and properties at design time.
12+
- [@babel/plugin-syntax-dynamic-import](https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import): Enables the use of dynamic import() syntax, facilitating code-splitting and lazy-loading of modules, which can significantly improve the performance of web applications.
13+
- [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env): Automatically determines the Babel plugins and polyfills needed based on the target environment's feature support, ensuring that the output code runs efficiently across all platforms.
14+
- [@babel/preset-react](https://www.npmjs.com/package/@babel/preset-react): Transforms JSX into standard JavaScript, making it compatible with the browser and enabling the use of React's powerful UI library and its ecosystem.
15+
- [@babel/preset-typescript](https://www.npmjs.com/package/@babel/preset-typescript): Provides support for TypeScript, allowing developers to leverage type-safe programming, interfaces, and other TypeScript features, which are compiled down to standard JavaScript.
16+
- [babel-plugin-react-require](https://www.npmjs.com/package/babel-plugin-react-require): Automatically injects the React import statement in files that use JSX, ensuring that the React namespace is always available where needed.
17+
- [babel-plugin-transform-react-remove-prop-types](https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types): Removes PropTypes from the production build of React components, reducing the bundle size and improving the performance of the production app.
1818

1919
This comprehensive setup empowers developers to write modern, efficient, and clean extension code across various modern web technologies, including [[React]] and [[TypeScript]].
2020

2121
## Next Steps
2222

23-
* Add a custom [[Babel]] config (`babel.config.js`) to your extension.
24-
* To maintain compatibility across diverse browser vendors, see [[Polyfill]].
25-
* Learn about [[React]] in Extension.
26-
* Learn about [[TypeScript]] in Extension.
23+
- Add a custom [[Babel]] config (`babel.config.js`) to your extension.
24+
- To maintain compatibility across diverse browser vendors, see [[Polyfill]].
25+
- Learn about [[React]] in Extension.
26+
- Learn about [[TypeScript]] in Extension.
2727

2828
---
2929

_WIP_Configuration Files/PostCSS.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
sort: 3
33
---
44

5-
65
---
76

87
**🧩 Extension** • create cross-browser extensions with no build configuration.

_WIP_Configuration Files/_Webpack.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sort: 7
3-
43
---
4+
55
TODO
66

77
---

_WIP_Contribute/Architecture Overview.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
sort: 2
3-
43
---
54

65
TODO

_WIP_Contribute/Help Ensuring Quality.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sort: 5
3-
43
---
4+
55
TODO
66

77
---

_WIP_Contribute/Help Me Fixing Stuff.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sort: 4
3-
43
---
4+
55
TODO
66

77
---

_WIP_Contribute/Run This Project Locally.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sort: 3
3-
43
---
4+
55
TODO
66

77
---

_WIP_Contribute/What This Project Is All About.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sort: 1
3-
43
---
4+
55
TODO
66

77
---

_WIP_Development/_Modern CSS/Less.md

+13-16
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npx extension dev @Extension/templates/less
1313
#### In an HTML file
1414

1515
```html
16-
<!DOCTYPE html>
16+
<!doctype html>
1717
<html lang="en">
1818
<head>
1919
<meta charset="utf-8" />
@@ -24,23 +24,20 @@ npx extension dev @Extension/templates/less
2424
</head>
2525
<body>
2626
<!-- Add the styles you need -->
27-
<h1 className="text-4xl font-bold">Hello, Extension.</h1>
27+
<h1 className="text-4xl font-bold">Hello, Extension.</h1>
2828
</body>
2929
</html>
30-
3130
```
3231

3332
#### In a JavaScript File
3433

3534
```js
3635
// ./NewTabApp.jsx
3736

38-
import './css/globals.css'
39-
37+
import "./css/globals.css";
38+
4039
export default function MyNewTabPage() {
41-
return (
42-
<h1 className="text-4xl font-bold">Hello, Extension.</h1>
43-
)
40+
return <h1 className="text-4xl font-bold">Hello, Extension.</h1>;
4441
}
4542
```
4643

@@ -50,20 +47,20 @@ export default function MyNewTabPage() {
5047
// ./content_script.jsx
5148

5249
// There is no HTML in a content_script file, so
53-
// we import our global CSS file via dynamic import.
54-
import('./css/globals.css')
55-
50+
// we import our global CSS file via dynamic import.
51+
import("./css/globals.css");
52+
5653
export default function MyNewTabPage() {
57-
return <h1 className="text-3xl font-bold underline">Hello, Extension!</h1>
54+
return <h1 className="text-3xl font-bold underline">Hello, Extension!</h1>;
5855
}
5956
```
6057

6158
## Next Steps
6259

63-
* Learn how to apply styles to the multiple extension contexts in [[Working With Stylesheets]].
64-
* Learn how to enable [[PostCSS]] capabilities in your extension.
65-
* Configure [[Tailwind]] in your extension.
66-
* Using [[Stylelint]] with Extension to lint your stylesheets.
60+
- Learn how to apply styles to the multiple extension contexts in [[Working With Stylesheets]].
61+
- Learn how to enable [[PostCSS]] capabilities in your extension.
62+
- Configure [[Tailwind]] in your extension.
63+
- Using [[Stylelint]] with Extension to lint your stylesheets.
6764

6865
---
6966

_WIP_Development/_Modern CSS/Sass.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ From [https://sass-lang.com/](https://sass-lang.com/):
1414

1515
<!-- <img src="https://place-hold.it/700x400"> -->
1616

17-
### Try it yourself
17+
### Try it yourself
1818

1919
```sh
2020
npx extension dev @Extension/templates/sass
2121
```
2222

23-
## Usage With An Existing Extension
23+
## Usage With An Existing Extension
2424

2525
### Installation & Configuration
2626

@@ -34,7 +34,7 @@ npm install -D sass
3434
#### In An HTML File
3535

3636
```html
37-
<!DOCTYPE html>
37+
<!doctype html>
3838
<html lang="en">
3939
<head>
4040
<meta charset="utf-8" />
@@ -45,10 +45,9 @@ npm install -D sass
4545
</head>
4646
<body>
4747
<!-- Add the styles you need -->
48-
<h1 className="text-4xl font-bold">Hello, Extension.</h1>
48+
<h1 className="text-4xl font-bold">Hello, Extension.</h1>
4949
</body>
5050
</html>
51-
5251
```
5352

5453
#### In A JavaScript File
@@ -57,7 +56,7 @@ npm install -D sass
5756
// ./NewTabApp.jsx
5857

5958
import styles from './styles/button.module.scss'
60-
59+
6160
export default function MyNewTabPage({ Component, pageProps }) {
6261
return (
6362
<h1 className={{styles.primaryColor}}>Hello, Extension.</h1>
@@ -72,9 +71,9 @@ export default function MyNewTabPage({ Component, pageProps }) {
7271
// ./content_script.jsx
7372
7473
// There is no HTML in a content_script file, so
75-
// we import our global CSS file via dynamic import.
74+
// we import our global CSS file via dynamic import.
7675
import('./css/globals.css')
77-
76+
7877
export default function MyNewTabPage() {
7978
return <h1 className="text-3xl font-bold underline">Hello, Extension!</h1>
8079
}
@@ -87,7 +86,7 @@ export default function MyNewTabPage() {
8786
/* styles/button.module.scss */
8887

8988
$primary-color: #64ff00;
90-
89+
9190
:export {
9291
primaryColor: $primary-color;
9392
}
@@ -97,19 +96,19 @@ $primary-color: #64ff00;
9796
// ./NewTabApp.jsx
9897

9998
import styles from './styles/button.module.scss'
100-
99+
101100
export default function MyNewTabPage({ Component, pageProps }) {
102101
return (
103102
<h1 className={{styles.primaryColor}}>Hello, Extension.</h1>
104103
)
105104
}
106105
```
107106

108-
Now, add `css/button.scss` as an import for the file you want Sass to work. For example:
107+
Now, add `css/button.scss` as an import for the file you want Sass to work. For example:
109108

110109
## Next Steps
111110

112-
* Ensure the semantics and code quality of your CSS files by using [[Stylelint]].
111+
- Ensure the semantics and code quality of your CSS files by using [[Stylelint]].
113112

114113
---
115114

_WIP_Features/HTML Fields.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
templateEngineOverride: njk,md
33
sort: 2
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of HtmlPlugin
78
-->
8-
TODO
9+
10+
TODO

_WIP_Features/Icon Fields.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
templateEngineOverride: njk,md
33
sort: 3
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of ScriptsPlugin
78
-->
8-
TODO
9+
10+
TODO

_WIP_Features/JSON Fields.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
templateEngineOverride: njk,md
33
sort: 6
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of JsonPlugin
78
-->
8-
TODO
9+
10+
TODO

_WIP_Features/Locales Files.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
templateEngineOverride: njk,md
33
sort: 7
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of LocalesPlugin
78
-->
8-
TODO
9+
10+
TODO
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
sort: 2
3-
43
---
5-
<!--
4+
5+
<!--
66
AUTHOR HINT: "I already have an extension" of README
77
-->
8-
TODO
9-
---
8+
9+
## TODO
1010

1111
**🧩 Extension** • create cross-browser extensions with no build configuration.

_WIP_Features/Page Reload And HMR.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
sort: 11
33
---
44

5-
<!--
6-
AUTHOR HINT: Reload capabilities are the "reload" and "browser" plugins in the webpack-confi
5+
<!--
6+
AUTHOR HINT: Reload capabilities are the "reload" and "browser" plugins in the webpack-config
77
-->
88

99
TODO

_WIP_Features/Script Fields.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
templateEngineOverride: njk,md
33
sort: 3
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of ScriptsPlugin
78
-->
8-

_WIP_Features/Static Assets.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
templateEngineOverride: njk,md
33
sort: 5
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of ResourcesPlugin
78
-->
8-
TODO
9+
10+
TODO

_WIP_Features/The Manifest File.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
templateEngineOverride: njk,md
33
sort: 1
44
---
5-
<!--
5+
6+
<!--
67
AUTHOR HINT: Features of ManifestPlugin
78
-->
8-
TODO
9+
10+
TODO

0 commit comments

Comments
 (0)