Skip to content

Commit aea38f7

Browse files
committed
(wip) chore: move eslint-plugin-svelte to under packages
1 parent 3891f0a commit aea38f7

File tree

1,862 files changed

+259
-255
lines changed

Some content is hidden

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

1,862 files changed

+259
-255
lines changed

.github/workflows/GHPages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: pnpm/action-setup@v2
2929
- uses: actions/setup-node@v4
3030
- name: Install And Build
31-
run: |+
31+
run: |
3232
pnpm install
3333
pnpm run update
3434
pnpm run build

.github/workflows/NodeCI.yml

+37-15
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
env:
10+
project_root_path: ./packages/eslint-plugin-svelte
11+
912
jobs:
1013
lint:
1114
runs-on: ubuntu-latest
@@ -16,11 +19,14 @@ jobs:
1619
- name: Install Packages
1720
run: pnpm install
1821
- name: Lint
19-
run: |+
22+
run: |
2023
pnpm run build
2124
pnpm run lint
25+
working-directory: ${{ env.project_root_path }}
2226
- name: Type Coverage
2327
run: pnpm run typecov
28+
working-directory: ${{ env.project_root_path }}
29+
2430
build:
2531
runs-on: ubuntu-latest
2632
steps:
@@ -30,9 +36,11 @@ jobs:
3036
- name: Install Packages
3137
run: pnpm install
3238
- name: Build
33-
run: |+
39+
run: |
3440
pnpm run update
3541
pnpm run build
42+
working-directory: ${{ env.project_root_path }}
43+
3644
test:
3745
name: 'Test for ESLint ${{ matrix.eslint }} on Node.js: ${{ matrix.node }} OS: ${{matrix.os}}'
3846
runs-on: ${{ matrix.os }}
@@ -49,15 +57,21 @@ jobs:
4957
uses: actions/setup-node@v4
5058
with:
5159
node-version: ${{ matrix.node }}
52-
- name: Install ESLint ${{ matrix.eslint }}
53-
run: |+
54-
pnpm install -D eslint@${{ matrix.eslint }}
55-
rm -rf node_modules
56-
if: matrix.eslint != 9
5760
- name: Install Packages
5861
run: pnpm install
62+
- name: Build eslint-plugin-svelte
63+
run: pnpm build
64+
working-directory: ${{ env.project_root_path }}
65+
- name: Install ESLint ${{ matrix.eslint }}
66+
if: matrix.eslint != 9
67+
# Hack: Install `eslint-plugin-svelte` is necessary for `packages/eslint-plugin-svelte/tests/src/configs` tests.
68+
run: pnpm install -D eslint@${{ matrix.eslint }} eslint-plugin-svelte
69+
working-directory: ${{ env.project_root_path }}
70+
5971
- name: Test
6072
run: pnpm run test
73+
working-directory: ${{ env.project_root_path }}
74+
6175
test-for-svelte-v4:
6276
name: 'Test for Svelte v4 on Node.js: ${{ matrix.node }} OS: ${{matrix.os}}'
6377
runs-on: ${{ matrix.os }}
@@ -83,17 +97,21 @@ jobs:
8397
with:
8498
node-version: ${{ matrix.node }}
8599
- name: Install svelte@4
86-
run: |+
100+
run: |
87101
pnpm install -D svelte@4
88102
rm -rf node_modules
103+
working-directory: ${{ env.project_root_path }}
89104
- name: Install ESLint ${{ matrix.eslint }}
90-
run: |+
105+
run: |
91106
pnpm install -D eslint@${{ matrix.eslint }}
92107
rm -rf node_modules
108+
working-directory: ${{ env.project_root_path }}
93109
- name: Install Packages
94110
run: pnpm install
95111
- name: Test
96112
run: pnpm run test
113+
working-directory: ${{ env.project_root_path }}
114+
97115
test-for-svelte-v3:
98116
name: Test for Svelte v3
99117
runs-on: ${{ matrix.os }}
@@ -109,18 +127,18 @@ jobs:
109127
uses: actions/setup-node@v4
110128
with:
111129
node-version: ${{ matrix.node }}
112-
- name: Remove @sveltejs/kit # Remove @sveltejs/kit because postinstall fails on old node.
113-
run: |+
114-
pnpm rm @sveltejs/kit
115-
rm -rf node_modules
116130
- name: Install svelte@3
117-
run: |+
131+
run: |
118132
pnpm install -D svelte@3 @typescript-eslint/parser@5 @typescript-eslint/eslint-plugin@5 eslint@8
119133
rm -rf node_modules
134+
rm -rf ../../node_modules
135+
working-directory: ${{ env.project_root_path }}
120136
- name: Install Packages
121137
run: pnpm install
122138
- name: Test
123139
run: pnpm run test
140+
working-directory: ${{ env.project_root_path }}
141+
124142
test-for-typescript-eslint-v5:
125143
name: Test for typescript-eslint v5
126144
runs-on: ${{ matrix.os }}
@@ -137,13 +155,16 @@ jobs:
137155
with:
138156
node-version: ${{ matrix.node }}
139157
- name: Install typescript-eslint v5
140-
run: |+
158+
run: |
141159
pnpm install -D @typescript-eslint/parser@5 @typescript-eslint/eslint-plugin@5
142160
rm -rf node_modules
161+
working-directory: ${{ env.project_root_path }}
143162
- name: Install Packages
144163
run: pnpm install
145164
- name: Test
146165
run: pnpm run test
166+
working-directory: ${{ env.project_root_path }}
167+
147168
update-resources:
148169
runs-on: ubuntu-latest
149170
steps:
@@ -156,6 +177,7 @@ jobs:
156177
run: pnpm install
157178
- name: Update resources
158179
run: pnpm run update
180+
working-directory: ${{ env.project_root_path }}
159181
- name: Check changes
160182
run: |
161183
git add --all && \

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ dist
102102

103103
## repo
104104
/pnpm-lock.yaml
105-
/lib
105+
packages/eslint-plugin-svelte/lib
106+
packages/eslint-plugin-svelte/.type-coverage
107+
106108
/.svelte-kit
107-
/.type-coverage
108109
/build
109110
/svelte.config-dist.js
110111
/docs-svelte-kit/shim/eslint.mjs

package.json

+8-183
Original file line numberDiff line numberDiff line change
@@ -1,198 +1,23 @@
11
{
2-
"name": "eslint-plugin-svelte",
3-
"version": "2.39.0",
4-
"description": "ESLint plugin for Svelte using AST",
5-
"repository": "git+https://github.com/sveltejs/eslint-plugin-svelte.git",
6-
"homepage": "https://sveltejs.github.io/eslint-plugin-svelte",
7-
"author": "Yosuke Ota (https://github.com/ota-meshi)",
8-
"contributors": [
9-
"JounQin (https://github.com/JounQin)"
10-
],
11-
"funding": "https://github.com/sponsors/ota-meshi",
2+
"name": "eslint-plugin-svelte-monorepo",
3+
"description": "eslint-plugin-svelte monorepo",
4+
"private": true,
125
"license": "MIT",
6+
"funding": "https://github.com/sponsors/ota-meshi",
137
"packageManager": "[email protected]",
14-
"engines": {
15-
"node": "^14.17.0 || >=16.0.0"
16-
},
17-
"type": "commonjs",
18-
"main": "lib/index.js",
19-
"files": [
20-
"lib"
21-
],
22-
"keywords": [
23-
"eslint",
24-
"eslint-plugin",
25-
"eslintplugin",
26-
"svelte",
27-
"sveltejs"
28-
],
298
"scripts": {
30-
"build": "pnpm run build:meta && pnpm run build:ts",
31-
"build:meta": "pnpm run ts ./tools/update-meta.ts",
32-
"build:ts": "tsc --project ./tsconfig.build.json",
33-
"clean": "rimraf .nyc_output lib coverage build .svelte-kit svelte.config-dist.js",
34-
"cover": "nyc --reporter=lcov pnpm run test",
35-
"debug": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
36-
"docs:build": "pnpm run svelte-kit build",
37-
"docs:preview": "pnpm run svelte-kit preview",
38-
"docs:watch": "pnpm run svelte-kit dev",
39-
"lint": "run-p lint:*",
40-
"lint-fix": "pnpm run lint-fix:md \"./**/*.md\" && pnpm run lint:es --fix && pnpm run lint:style --fix",
41-
"lint-fix:md": "prettier --cache --write \"./**/*.md\"",
42-
"lint:es": "eslint --cache .",
43-
"lint:md": "prettier --cache --check \"./**/*.md\"",
44-
"lint:style": "stylelint --cache .",
45-
"mocha": "pnpm run ts ./node_modules/mocha/bin/mocha.js",
46-
"new": "pnpm run ts ./tools/new-rule.ts",
47-
"prebuild": "pnpm run clean",
48-
"prerelease": "pnpm run clean && pnpm run build",
9+
"prerelease": "cd packages/eslint-plugin-svelte && pnpm clean && pnpm run build && cd ../..",
4910
"release": "changeset publish",
50-
"svelte-kit": "env-cmd -e sveltekit node node_modules/vite/bin/vite.js",
51-
"test": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
52-
"test:debug": "env-cmd -e debug pnpm run test",
53-
"test:update-fixtures": "env-cmd -e update-fixtures pnpm run test",
54-
"ts": "node -r esbuild-register",
55-
"typecov": "type-coverage",
56-
"update": "pnpm run ts ./tools/update.ts && pnpm run lint-fix:md",
57-
"version": "env-cmd -e version pnpm run update",
58-
"version:ci": "env-cmd -e version-ci pnpm run update && changeset version"
59-
},
60-
"peerDependencies": {
61-
"eslint": "^7.0.0 || ^8.0.0-0 || ^9.0.0-0",
62-
"svelte": "^3.37.0 || ^4.0.0 || ^5.0.0-next.112"
63-
},
64-
"peerDependenciesMeta": {
65-
"svelte": {
66-
"optional": true
67-
}
68-
},
69-
"dependencies": {
70-
"@eslint-community/eslint-utils": "^4.4.0",
71-
"@jridgewell/sourcemap-codec": "^1.4.15",
72-
"debug": "^4.3.4",
73-
"eslint-compat-utils": "^0.5.0",
74-
"esutils": "^2.0.3",
75-
"known-css-properties": "^0.31.0",
76-
"postcss": "^8.4.38",
77-
"postcss-load-config": "^3.1.4",
78-
"postcss-safe-parser": "^6.0.0",
79-
"postcss-selector-parser": "^6.0.16",
80-
"semver": "^7.6.0",
81-
"svelte-eslint-parser": ">=0.36.0 <1.0.0"
11+
"version": "env-cmd -e version cd packages/eslint-plugin-svelte && pnpm run update && cd ../..",
12+
"version:ci": "env-cmd -e version-ci cd packages/eslint-plugin-svelte && pnpm run update && cd ../.. && changeset version"
8213
},
8314
"devDependencies": {
84-
"@1stg/stylelint-config": "^6.0.0",
85-
"@babel/core": "^7.24.4",
86-
"@babel/eslint-parser": "^7.24.1",
87-
"@babel/plugin-proposal-function-bind": "^7.24.1",
88-
"@babel/types": "^7.24.0",
8915
"@changesets/changelog-github": "^0.5.0",
9016
"@changesets/cli": "^2.27.1",
9117
"@changesets/get-release-plan": "^4.0.0",
92-
"@eslint-community/eslint-plugin-eslint-comments": "4.3.0",
93-
"@fontsource/fira-mono": "^5.0.12",
94-
"@ota-meshi/eslint-plugin": "^0.17.1",
95-
"@sindresorhus/slugify": "^2.2.1",
96-
"@sveltejs/adapter-static": "^3.0.1",
97-
"@sveltejs/kit": "^2.5.6",
98-
"@sveltejs/vite-plugin-svelte": "^3.1.0",
99-
"@types/babel__core": "^7.20.5",
100-
"@types/cross-spawn": "^6.0.6",
101-
"@types/escape-html": "^1.0.4",
102-
"@types/eslint": "^8.56.10",
103-
"@types/eslint-scope": "^3.7.7",
104-
"@types/eslint-utils": "^3.0.5",
105-
"@types/eslint-visitor-keys": "^3.3.0",
106-
"@types/esutils": "^2.0.2",
107-
"@types/json-schema": "^7.0.15",
108-
"@types/less": "^3.0.6",
109-
"@types/markdown-it": "^14.0.1",
110-
"@types/markdown-it-container": "^2.0.10",
111-
"@types/markdown-it-emoji": "^3.0.0",
112-
"@types/mocha": "^10.0.6",
113-
"@types/node": "^20.12.7",
114-
"@types/postcss-safe-parser": "^5.0.4",
115-
"@types/prismjs": "^1.26.3",
116-
"@types/semver": "^7.5.8",
117-
"@types/stylus": "^0.48.42",
118-
"@typescript-eslint/eslint-plugin": "^7.7.0",
119-
"@typescript-eslint/parser": "^7.7.0",
120-
"@typescript/vfs": "^1.5.0",
121-
"acorn": "^8.11.3",
122-
"assert": "^2.1.0",
123-
"cross-spawn": "^7.0.3",
124-
"env-cmd": "^10.1.0",
125-
"esbuild": "^0.21.0",
126-
"esbuild-register": "^3.5.0",
127-
"escape-html": "^1.0.3",
128-
"eslint": "^9.0.0",
129-
"eslint-config-prettier": "^9.1.0",
130-
"eslint-formatter-friendly": "^7.0.0",
131-
"eslint-plugin-eslint-plugin": "^6.0.0",
132-
"eslint-plugin-jsdoc": "^48.2.3",
133-
"eslint-plugin-json-schema-validator": "^5.1.0",
134-
"eslint-plugin-jsonc": "^2.15.1",
135-
"eslint-plugin-markdown": "^5.0.0",
136-
"eslint-plugin-mdx": "^3.1.5",
137-
"eslint-plugin-n": "^17.2.1",
138-
"eslint-plugin-node-dependencies": "^0.12.0",
139-
"eslint-plugin-prettier": "^5.1.3",
140-
"eslint-plugin-regexp": "^2.5.0",
141-
"eslint-plugin-svelte": "^2.37.0",
142-
"eslint-plugin-yml": "^1.14.0",
143-
"eslint-scope": "^8.0.1",
144-
"eslint-typegen": "^0.2.3",
145-
"eslint-visitor-keys": "^4.0.0",
146-
"espree": "^10.0.1",
147-
"estree-walker": "^3.0.3",
148-
"globals": "^15.0.0",
149-
"less": "^4.2.0",
150-
"locate-character": "^3.0.0",
151-
"magic-string": "^0.30.10",
152-
"markdown-it-anchor": "^8.6.7",
153-
"markdown-it-container": "^4.0.0",
154-
"markdown-it-emoji": "^3.0.0",
155-
"mocha": "^10.4.0",
156-
"npm-run-all2": "^6.1.2",
157-
"nyc": "^15.1.0",
158-
"pako": "^2.1.0",
159-
"postcss-nested": "^6.0.1",
160-
"prettier": "^3.2.5",
161-
"prettier-plugin-pkg": "^0.18.1",
162-
"prettier-plugin-svelte": "^3.2.3",
163-
"prism-svelte": "^0.5.0",
164-
"prismjs": "^1.29.0",
165-
"rimraf": "^5.0.5",
166-
"sass": "^1.75.0",
167-
"source-map-js": "^1.2.0",
168-
"stylelint": "~16.5.0",
169-
"stylelint-config-standard": "^36.0.0",
170-
"stylus": "^0.63.0",
171-
"svelte": "^5.0.0-next.112",
172-
"svelte-adapter-ghpages": "0.2.2",
173-
"svelte-i18n": "^4.0.0",
174-
"tslib": "^2.6.2",
175-
"type-coverage": "^2.28.1",
176-
"typescript": "~5.4.5",
177-
"typescript-eslint": "^7.7.0",
178-
"util": "^0.12.5",
179-
"vite": "^5.2.9",
180-
"vite-plugin-eslint4b": "^0.4.0",
181-
"vite-plugin-svelte-md": "^0.1.7",
182-
"yaml": "^2.4.1"
18+
"typescript": "~5.4.5"
18319
},
18420
"publishConfig": {
18521
"access": "public"
186-
},
187-
"typeCoverage": {
188-
"atLeast": 97,
189-
"cache": true,
190-
"detail": true,
191-
"ignoreAsAssertion": true,
192-
"ignoreNested": true,
193-
"ignoreNonNullAssertion": true,
194-
"showRelativePath": true,
195-
"strict": true,
196-
"update": true
19722
}
19823
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
3+
module.exports = {
4+
version: {
5+
IN_VERSION_SCRIPT: 'true'
6+
},
7+
'version-ci': {
8+
IN_VERSION_CI_SCRIPT: 'true'
9+
},
10+
debug: {
11+
DEBUG: 'eslint-plugin-svelte*'
12+
},
13+
'update-fixtures': {
14+
UPDATE_FIXTURES: 'true'
15+
}
16+
};
File renamed without changes.

0 commit comments

Comments
 (0)