Skip to content

Commit

Permalink
fix: disable no-self-assign rule (take2) (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed May 3, 2023
1 parent b58606b commit 295091b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-gorillas-help.md
@@ -0,0 +1,5 @@
---
"eslint-plugin-svelte": patch
---

fix: disable no-self-assign rule (take2)
16 changes: 16 additions & 0 deletions .github/workflows/NodeCI.yml
Expand Up @@ -53,10 +53,26 @@ jobs:
run: |+
yarn add -D eslint@${{ matrix.eslint }} --ignore-engines
rm -rf node_modules
rm -rf yarn.lock
if: matrix.eslint != 8
- name: Install Packages
run: yarn install --ignore-engines
- name: Test
run: yarn test
- name: Type Coverage
run: yarn typecov
update-resources:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Packages
run: yarn install --ignore-engines
- name: Update resources
run: yarn update
- name: Check changes
run: |
git add --all && \
git diff-index --cached HEAD --stat --exit-code
2 changes: 2 additions & 0 deletions src/configs/base.ts
Expand Up @@ -8,6 +8,8 @@ export = {
// ESLint core rules known to cause problems with `.svelte`.
"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`.
// "no-irregular-whitespace": "off",
// Self assign is one of way to update reactive value in Svelte.
"no-self-assign": "off",

// eslint-plugin-svelte rules
"svelte/comment-directive": "error",
Expand Down
2 changes: 2 additions & 0 deletions tools/update-rulesets.ts
Expand Up @@ -12,6 +12,8 @@ const baseContent = `export = {
// ESLint core rules known to cause problems with \`.svelte\`.
"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\`.
// "no-irregular-whitespace": "off",
// Self assign is one of way to update reactive value in Svelte.
"no-self-assign": "off",
// eslint-plugin-svelte rules
${rules
Expand Down

0 comments on commit 295091b

Please sign in to comment.