Skip to content

Commit 26e695d

Browse files
committed
Setup eslint
1 parent 6485f1d commit 26e695d

File tree

10 files changed

+152
-4
lines changed

10 files changed

+152
-4
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# VSCode
2+
.vscode/*
3+
!.vscode/settings.json
4+
!.vscode/tasks.json
5+
!.vscode/launch.json
6+
!.vscode/extensions.json
7+
!.vscode/*.code-snippets
8+
9+
# Local History for Visual Studio Code
10+
.history/
11+
12+
# Built Visual Studio Code Extensions
13+
*.vsix
14+
15+
# Build
116
/dist
217

318
# Logs

.pnp.cjs

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarn/sdks/eslint/bin/eslint.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire, createRequireFromPath} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require eslint/bin/eslint.js
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real eslint/bin/eslint.js your application uses
20+
module.exports = absRequire(`eslint/bin/eslint.js`);

.yarn/sdks/eslint/lib/api.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire, createRequireFromPath} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require eslint
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real eslint your application uses
20+
module.exports = absRequire(`eslint`);

.yarn/sdks/eslint/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "eslint",
3+
"version": "8.15.0-sdk",
4+
"main": "./lib/api.js",
5+
"type": "commonjs"
6+
}

.yarn/sdks/integrations.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is automatically generated by @yarnpkg/sdks.
2+
# Manual changes might be lost!
3+
4+
integrations:
5+
- vscode

.yarn/sdks/prettier/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire, createRequireFromPath} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require prettier/index.js
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real prettier/index.js your application uses
20+
module.exports = absRequire(`prettier/index.js`);

.yarn/sdks/prettier/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "prettier",
3+
"version": "2.6.2-sdk",
4+
"main": "./index.js",
5+
"type": "commonjs"
6+
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Userscripts",
3-
"version": "1.0.4",
4-
"description": "",
3+
"version": "1.1.0",
4+
"description": "A collection of userscript experiments that are too small to be in an extension. From minor website adjustments such as removing spoilers to improving the media viewer.",
55
"author": "quantix-dev",
66
"license": "MIT",
77
"repository": {
@@ -28,6 +28,7 @@
2828
"@violentmonkey/ui": "^0.7.0"
2929
},
3030
"devDependencies": {
31+
"@babel/eslint-plugin": "latest",
3132
"@babel/plugin-transform-react-jsx": "^7.16.0",
3233
"@babel/runtime": "^7.16.3",
3334
"@gera2ld/plaid": "~2.4.0",
@@ -38,6 +39,7 @@
3839
"del-cli": "^4.0.1",
3940
"eslint": "^8.14.0",
4041
"eslint-config-prettier": "^8.3.0",
42+
"eslint-plugin-import": "latest",
4143
"eslint-plugin-prettier": "^4.0.0",
4244
"husky": "^8.0.1",
4345
"npm-run-all": "^4.1.5",

yarn.lock

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ __metadata:
7777
languageName: node
7878
linkType: hard
7979

80-
"@babel/eslint-plugin@npm:^7.14.5":
80+
"@babel/eslint-plugin@npm:^7.14.5, @babel/eslint-plugin@npm:latest":
8181
version: 7.17.7
8282
resolution: "@babel/eslint-plugin@npm:7.17.7"
8383
dependencies:
@@ -1880,6 +1880,7 @@ __metadata:
18801880
version: 0.0.0-use.local
18811881
resolution: "Userscripts@workspace:."
18821882
dependencies:
1883+
"@babel/eslint-plugin": latest
18831884
"@babel/plugin-transform-react-jsx": ^7.16.0
18841885
"@babel/runtime": ^7.16.3
18851886
"@gera2ld/plaid": ~2.4.0
@@ -1890,6 +1891,7 @@ __metadata:
18901891
del-cli: ^4.0.1
18911892
eslint: ^8.14.0
18921893
eslint-config-prettier: ^8.3.0
1894+
eslint-plugin-import: latest
18931895
eslint-plugin-prettier: ^4.0.0
18941896
husky: ^8.0.1
18951897
npm-run-all: ^4.1.5
@@ -3294,7 +3296,7 @@ __metadata:
32943296
languageName: node
32953297
linkType: hard
32963298

3297-
"eslint-plugin-import@npm:^2.23.4":
3299+
"eslint-plugin-import@npm:^2.23.4, eslint-plugin-import@npm:latest":
32983300
version: 2.26.0
32993301
resolution: "eslint-plugin-import@npm:2.26.0"
33003302
dependencies:

0 commit comments

Comments
 (0)