Skip to content

Commit

Permalink
chore: do not format .svelte fixtures unexpectedly
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jun 30, 2022
1 parent 7bd70b6 commit 97add0c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
13 changes: 13 additions & 0 deletions patches/@1stg+lint-staged+1.7.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@1stg/lint-staged/base.js b/node_modules/@1stg/lint-staged/base.js
index 827bd15..51c8e5d 100644
--- a/node_modules/@1stg/lint-staged/base.js
+++ b/node_modules/@1stg/lint-staged/base.js
@@ -1,7 +1,7 @@
const { isPkgAvailable, tryFile } = require('@pkgr/utils')

const config = [
- '*.{*sh,env,env.*,gql,html,json,properties,pug,rb,svelte,vue,toml,yaml,yml}',
+ '*.{*sh,env,env.*,gql,html,json,properties,pug,rb,vue,toml,yaml,yml}',
'.*rc',
'Dockerfile',
].reduce(
4 changes: 2 additions & 2 deletions test/fixtures/@ota-meshi/eslint-plugin-svelte/App.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
let name = 'world';
let name = 'world';
</script>

<h1>Hello {name}!</h1>
<h1 > Hello { name }!</h1>
16 changes: 8 additions & 8 deletions test/prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,29 +264,29 @@ runFixture('@ota-meshi/eslint-plugin-svelte/*.svelte', [
[
{
column: 5,
endColumn: 13,
endColumn: 11,
endLine: 2,
fix: {
range: [13, 21],
text: 'name =',
range: [13, 19],
text: 'name',
},
line: 2,
message: 'Replace `·name·` with `name·=`',
message: 'Replace `·name·` with `name`',
messageId: 'replace',
nodeType: null,
ruleId: 'prettier/prettier',
severity: 2,
},
{
column: 4,
endColumn: 7,
endColumn: 20,
endLine: 5,
fix: {
range: [45, 48],
text: '>',
range: [45, 61],
text: '>Hello {name',
},
line: 5,
message: 'Replace `·>·` with `>`',
message: 'Replace `·>·Hello·{·name·` with `>Hello·{name`',
messageId: 'replace',
nodeType: null,
ruleId: 'prettier/prettier',
Expand Down

0 comments on commit 97add0c

Please sign in to comment.