-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve prettier and lint-staged configs
- Loading branch information
Showing
14 changed files
with
144 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1 @@ | ||
const { isPkgAvailable, tryFile } = require('@pkgr/utils') | ||
|
||
const config = { ...require('./base') } | ||
|
||
if (isPkgAvailable('eslint')) { | ||
Object.assign( | ||
config, | ||
{ | ||
'*.{js,jsx,md,mdx,mjs,vue}': ['eslint --cache -f friendly --fix'], | ||
}, | ||
require('./ts-eslint'), | ||
) | ||
} | ||
|
||
if (isPkgAvailable('tslint') && tryFile('tslint.json')) { | ||
Object.assign(config, require('./ts-tslint')) | ||
} | ||
|
||
module.exports = config | ||
module.exports = require('./base') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
...require('.'), | ||
...require('./base'), | ||
'*.ts?(x)': () => 'tsc --incremental false --noEmit', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const baseConfig = require('./base') | ||
|
||
module.exports = { | ||
...baseConfig, | ||
overrides: [ | ||
...baseConfig.overrides, | ||
{ | ||
files: '*.html', | ||
options: { | ||
parser: 'svelte', | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts"> | ||
let count = 1 | ||
// the `$:` means 're-run whenever these values change' | ||
$: doubled = count * 2 | ||
$: quadrupled = doubled * 2 | ||
function handleClick() { | ||
count += 1 | ||
} | ||
</script> | ||
|
||
<button class="test" on:click={handleClick}>Count: {count}</button> | ||
|
||
<p>{count} * 2 = {doubled}</p> | ||
<p>{doubled} * 2 = {quadrupled}</p> | ||
|
||
<style> | ||
.test { | ||
border: transparent; | ||
} | ||
</style> |
Oops, something went wrong.