Skip to content

Commit 5064bfa

Browse files
authored
chore: use prettier-plugin-pkg for consistent sorting (#176)
1 parent 0d0b221 commit 5064bfa

File tree

4 files changed

+129
-115
lines changed

4 files changed

+129
-115
lines changed

.eslintrc.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
module.exports = {
66
parserOptions: {
77
sourceType: "script",
8-
ecmaVersion: 2020,
8+
ecmaVersion: "latest",
99
},
1010
extends: [
1111
"plugin:@ota-meshi/recommended",
@@ -16,6 +16,12 @@ module.exports = {
1616
"plugin:@ota-meshi/+json",
1717
],
1818
rules: {
19+
"prettier/prettier": [
20+
"error",
21+
{
22+
usePrettierrc: true,
23+
},
24+
],
1925
"require-jsdoc": "error",
2026
"no-warning-comments": "warn",
2127
"no-lonely-if": "off",
@@ -57,17 +63,17 @@ module.exports = {
5763
format: null,
5864
},
5965
],
60-
"no-implicit-globals": "off",
6166
"@typescript-eslint/no-non-null-assertion": "off",
6267
"@typescript-eslint/no-use-before-define": "off",
6368
"@typescript-eslint/no-explicit-any": "off",
69+
"no-implicit-globals": "off",
6470
},
6571
},
6672
{
6773
files: ["scripts/**/*.ts", "tests/**/*.ts"],
6874
rules: {
69-
"require-jsdoc": "off",
7075
"no-console": "off",
76+
"require-jsdoc": "off",
7177
},
7278
},
7379
],

.prettierrc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"tabWidth": 4,
3+
"semi": false,
4+
"trailingComma": "all",
5+
"overrides": [
6+
{
7+
"files": "**/package.json",
8+
"options": {
9+
"tabWidth": 2
10+
}
11+
}
12+
]
13+
}

explorer-v2/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
{
22
"name": "svelte-eslint-parser-ast-explorer",
33
"version": "0.1.0",
4+
"type": "module",
45
"private": true,
56
"scripts": {
6-
"dev": "svelte-kit dev",
77
"build": "svelte-kit build",
8-
"preview": "svelte-kit preview",
9-
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
8+
"dev": "svelte-kit dev",
109
"format": "prettier --write --plugin-search-dir=. .",
11-
"pre-build": "cd build-system/pre-build && webpack && cd .."
10+
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
11+
"pre-build": "cd build-system/pre-build && webpack && cd ..",
12+
"preview": "svelte-kit preview"
13+
},
14+
"dependencies": {
15+
"@fontsource/fira-mono": "^4.2.2",
16+
"eslint": "^8.0.0",
17+
"eslint-plugin-svelte3": "^4.0.0",
18+
"eslint-scope": "^7.0.0",
19+
"pako": "^2.0.3",
20+
"svelte": "^3.41.0",
21+
"svelte-eslint-parser": "file:.."
1222
},
1323
"devDependencies": {
1424
"@sveltejs/adapter-static": "^1.0.0-next.13",
@@ -19,15 +29,5 @@
1929
"webpack": "^5.37.1",
2030
"webpack-cli": "^4.7.0",
2131
"wrapper-webpack-plugin": "^2.1.0"
22-
},
23-
"type": "module",
24-
"dependencies": {
25-
"@fontsource/fira-mono": "^4.2.2",
26-
"eslint": "^8.0.0",
27-
"eslint-plugin-svelte3": "^4.0.0",
28-
"eslint-scope": "^7.0.0",
29-
"pako": "^2.0.3",
30-
"svelte": "^3.41.0",
31-
"svelte-eslint-parser": "file:.."
3232
}
3333
}

package.json

Lines changed: 93 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,95 @@
11
{
2-
"name": "svelte-eslint-parser",
3-
"version": "0.16.4",
4-
"description": "Svelte parser for ESLint",
5-
"main": "lib/index.js",
6-
"files": [
7-
"lib"
8-
],
9-
"engines": {
10-
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
11-
},
12-
"packageManager": "[email protected]",
13-
"scripts": {
14-
"prebuild": "yarn clean",
15-
"build": "tsc --project ./tsconfig.build.json",
16-
"clean": "rimraf .nyc_output lib coverage",
17-
"lint": "eslint . --ext .js,.ts,.json,.svelte",
18-
"eslint-fix": "yarn lint --fix",
19-
"ts": "node -r esbuild-register",
20-
"mocha": "yarn ts ./node_modules/mocha/bin/mocha.js",
21-
"test": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
22-
"cover": "nyc --reporter=lcov yarn test",
23-
"debug": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
24-
"preversion": "yarn lint && yarn test",
25-
"update-fixtures": "yarn ts ./tools/update-fixtures.ts",
26-
"eslint-playground": "eslint tests/fixtures --ext .svelte --config .eslintrc-for-playground.js --format codeframe",
27-
"benchmark": "yarn ts benchmark/index.ts"
28-
},
29-
"repository": {
30-
"type": "git",
31-
"url": "git+https://github.com/ota-meshi/svelte-eslint-parser.git"
32-
},
33-
"keywords": [
34-
"svelte",
35-
"sveltejs",
36-
"eslint",
37-
"parser"
38-
],
39-
"author": "Yosuke Ota (https://github.com/ota-meshi)",
40-
"contributors": [
41-
"JounQin (https://github.com/JounQin)"
42-
],
43-
"funding": "https://github.com/sponsors/ota-meshi",
44-
"license": "MIT",
45-
"bugs": {
46-
"url": "https://github.com/ota-meshi/svelte-eslint-parser/issues"
47-
},
48-
"homepage": "https://github.com/ota-meshi/svelte-eslint-parser#readme",
49-
"dependencies": {
50-
"eslint-scope": "^7.0.0",
51-
"eslint-visitor-keys": "^3.0.0",
52-
"espree": "^9.0.0"
53-
},
54-
"peerDependencies": {
55-
"svelte": "^3.37.0"
56-
},
57-
"devDependencies": {
58-
"@ota-meshi/eslint-plugin": "^0.10.0",
59-
"@types/benchmark": "^2.1.1",
60-
"@types/chai": "^4.3.0",
61-
"@types/eslint": "^8.0.0",
62-
"@types/eslint-scope": "^3.7.0",
63-
"@types/eslint-visitor-keys": "^1.0.0",
64-
"@types/mocha": "^9.0.0",
65-
"@types/node": "^16.0.0",
66-
"@types/semver": "^7.3.9",
67-
"@typescript-eslint/eslint-plugin": "^5.4.0",
68-
"@typescript-eslint/parser": "^5.4.0",
69-
"benchmark": "^2.1.4",
70-
"chai": "^4.3.4",
71-
"code-red": "^0.2.3",
72-
"esbuild": "^0.14.48",
73-
"esbuild-register": "^3.3.3",
74-
"eslint": "^8.2.0",
75-
"eslint-config-prettier": "^8.3.0",
76-
"eslint-plugin-eslint-comments": "^3.2.0",
77-
"eslint-plugin-json-schema-validator": "^3.0.0",
78-
"eslint-plugin-jsonc": "^2.0.0",
79-
"eslint-plugin-node": "^11.1.0",
80-
"eslint-plugin-node-dependencies": "^0.8.0",
81-
"eslint-plugin-prettier": "^4.0.0",
82-
"eslint-plugin-regexp": "^1.5.0",
83-
"eslint-plugin-svelte": "^2.0.0",
84-
"eslint-plugin-svelte3": "^4.0.0",
85-
"eslint-plugin-vue": "^9.0.0",
86-
"estree-walker": "^3.0.0",
87-
"locate-character": "^2.0.5",
88-
"magic-string": "^0.26.0",
89-
"mocha": "^10.0.0",
90-
"mocha-chai-jest-snapshot": "^1.1.3",
91-
"nyc": "^15.1.0",
92-
"prettier": "^2.0.5",
93-
"prettier-plugin-svelte": "^2.5.0",
94-
"semver": "^7.3.5",
95-
"string-replace-loader": "^3.0.3",
96-
"svelte": "^3.46.1",
97-
"typescript": "~4.7.0",
98-
"vue-eslint-parser": "^9.0.0"
99-
}
2+
"name": "svelte-eslint-parser",
3+
"version": "0.16.4",
4+
"description": "Svelte parser for ESLint",
5+
"repository": "git+https://github.com/ota-meshi/svelte-eslint-parser.git",
6+
"homepage": "https://github.com/ota-meshi/svelte-eslint-parser#readme",
7+
"funding": "https://github.com/sponsors/ota-meshi",
8+
"author": "Yosuke Ota (https://github.com/ota-meshi)",
9+
"contributors": [
10+
"JounQin (https://github.com/JounQin)"
11+
],
12+
"license": "MIT",
13+
"packageManager": "[email protected]",
14+
"engines": {
15+
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
16+
},
17+
"main": "lib/index.js",
18+
"files": [
19+
"lib"
20+
],
21+
"keywords": [
22+
"svelte",
23+
"sveltejs",
24+
"eslint",
25+
"parser"
26+
],
27+
"scripts": {
28+
"benchmark": "yarn ts benchmark/index.ts",
29+
"build": "tsc --project ./tsconfig.build.json",
30+
"clean": "rimraf .nyc_output lib coverage",
31+
"cover": "nyc --reporter=lcov yarn test",
32+
"debug": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
33+
"eslint-fix": "yarn lint --fix",
34+
"eslint-playground": "eslint tests/fixtures --ext .svelte --config .eslintrc-for-playground.js --format codeframe",
35+
"lint": "eslint . --ext .js,.ts,.json,.svelte",
36+
"mocha": "yarn ts ./node_modules/mocha/bin/mocha.js",
37+
"prebuild": "yarn clean",
38+
"preversion": "yarn lint && yarn test",
39+
"test": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
40+
"ts": "node -r esbuild-register",
41+
"update-fixtures": "yarn ts ./tools/update-fixtures.ts"
42+
},
43+
"peerDependencies": {
44+
"svelte": "^3.37.0"
45+
},
46+
"dependencies": {
47+
"eslint-scope": "^7.0.0",
48+
"eslint-visitor-keys": "^3.0.0",
49+
"espree": "^9.0.0"
50+
},
51+
"devDependencies": {
52+
"@ota-meshi/eslint-plugin": "^0.10.0",
53+
"@types/benchmark": "^2.1.1",
54+
"@types/chai": "^4.3.0",
55+
"@types/eslint": "^8.0.0",
56+
"@types/eslint-scope": "^3.7.0",
57+
"@types/eslint-visitor-keys": "^1.0.0",
58+
"@types/mocha": "^9.0.0",
59+
"@types/node": "^16.0.0",
60+
"@types/semver": "^7.3.9",
61+
"@typescript-eslint/eslint-plugin": "^5.4.0",
62+
"@typescript-eslint/parser": "^5.4.0",
63+
"benchmark": "^2.1.4",
64+
"chai": "^4.3.4",
65+
"code-red": "^0.2.3",
66+
"esbuild": "^0.14.48",
67+
"esbuild-register": "^3.3.3",
68+
"eslint": "^8.2.0",
69+
"eslint-config-prettier": "^8.3.0",
70+
"eslint-plugin-eslint-comments": "^3.2.0",
71+
"eslint-plugin-json-schema-validator": "^3.0.0",
72+
"eslint-plugin-jsonc": "^2.0.0",
73+
"eslint-plugin-node": "^11.1.0",
74+
"eslint-plugin-node-dependencies": "^0.8.0",
75+
"eslint-plugin-prettier": "^4.0.0",
76+
"eslint-plugin-regexp": "^1.5.0",
77+
"eslint-plugin-svelte": "^2.0.0",
78+
"eslint-plugin-svelte3": "^4.0.0",
79+
"eslint-plugin-vue": "^9.0.0",
80+
"estree-walker": "^3.0.0",
81+
"locate-character": "^2.0.5",
82+
"magic-string": "^0.26.0",
83+
"mocha": "^10.0.0",
84+
"mocha-chai-jest-snapshot": "^1.1.3",
85+
"nyc": "^15.1.0",
86+
"prettier": "^2.0.5",
87+
"prettier-plugin-pkg": "^0.14.1",
88+
"prettier-plugin-svelte": "^2.5.0",
89+
"semver": "^7.3.5",
90+
"string-replace-loader": "^3.0.3",
91+
"svelte": "^3.46.1",
92+
"typescript": "~4.7.0",
93+
"vue-eslint-parser": "^9.0.0"
94+
}
10095
}

0 commit comments

Comments
 (0)