Skip to content

Commit 295091b

Browse files
authored
fix: disable no-self-assign rule (take2) (#461)
1 parent b58606b commit 295091b

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

.changeset/angry-gorillas-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-svelte": patch
3+
---
4+
5+
fix: disable no-self-assign rule (take2)

.github/workflows/NodeCI.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,26 @@ jobs:
5353
run: |+
5454
yarn add -D eslint@${{ matrix.eslint }} --ignore-engines
5555
rm -rf node_modules
56+
rm -rf yarn.lock
5657
if: matrix.eslint != 8
5758
- name: Install Packages
5859
run: yarn install --ignore-engines
5960
- name: Test
6061
run: yarn test
6162
- name: Type Coverage
6263
run: yarn typecov
64+
update-resources:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v3
68+
- uses: actions/setup-node@v3
69+
with:
70+
node-version: 18
71+
- name: Install Packages
72+
run: yarn install --ignore-engines
73+
- name: Update resources
74+
run: yarn update
75+
- name: Check changes
76+
run: |
77+
git add --all && \
78+
git diff-index --cached HEAD --stat --exit-code

src/configs/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export = {
88
// ESLint core rules known to cause problems with `.svelte`.
99
"no-inner-declarations": "off", // The AST generated by svelte-eslint-parser will false positives in it rule because the root node of the script is not the `Program`.
1010
// "no-irregular-whitespace": "off",
11+
// Self assign is one of way to update reactive value in Svelte.
12+
"no-self-assign": "off",
1113

1214
// eslint-plugin-svelte rules
1315
"svelte/comment-directive": "error",

tools/update-rulesets.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const baseContent = `export = {
1212
// ESLint core rules known to cause problems with \`.svelte\`.
1313
"no-inner-declarations": "off", // The AST generated by svelte-eslint-parser will false positives in it rule because the root node of the script is not the \`Program\`.
1414
// "no-irregular-whitespace": "off",
15+
// Self assign is one of way to update reactive value in Svelte.
16+
"no-self-assign": "off",
1517
1618
// eslint-plugin-svelte rules
1719
${rules

0 commit comments

Comments
 (0)