-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
111 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,47 @@ | ||
// eslint.config.js | ||
import antfu from '@antfu/eslint-config'; | ||
|
||
// References: | ||
// 1. https://github.com/antfu/eslint-config | ||
// 2. https://github.com/antfu/eslint-plugin-antfu | ||
// 3. https://github.com/antfu/eslint-plugin-format | ||
export default antfu({ | ||
// The default is 'app', but we might want to | ||
// use `lib` here and `app` within `/website`. | ||
// type: 'lib', | ||
|
||
// In case we want to use a custom config within `website`: 'app/**' | ||
ignores: ['.nx/cache', 'coverage/**', 'dist/**', 'scrap/**', 'app/**'], | ||
|
||
formatters: { | ||
// Formats .css and .scss files, but also the `<style>` blocks in Vue. | ||
css: true, | ||
markdown: true, | ||
}, | ||
|
||
stylistic: { | ||
semi: true, | ||
export default antfu( | ||
// Library config | ||
{ | ||
type: 'lib', | ||
// Antfu respects `gitignore`, so we don't need to repeat those directories. | ||
ignores: ['app/**'], | ||
formatters: { | ||
markdown: true, | ||
}, | ||
stylistic: { | ||
semi: true, | ||
}, | ||
typescript: { | ||
tsconfigPath: 'tsconfig.json', | ||
}, | ||
vue: false, | ||
}, | ||
// General config | ||
{ | ||
// Without a `files` scope, these rules will apply to everything. | ||
rules: { | ||
'antfu/if-newline': 'off', | ||
'no-console': 'warn', | ||
'style/arrow-parens': ['error', 'always'], | ||
'style/object-curly-spacing': ['error', 'never'], | ||
'test/prefer-lowercase-title': 'off', | ||
'ts/explicit-function-return-type': 'off', | ||
'ts/strict-boolean-expressions': 'off', | ||
// Would like this if I could differentiate between ternary and if conditions. | ||
// 'style/operator-linebreak': ['error', 'after'], | ||
|
||
typescript: { | ||
tsconfigPath: 'tsconfig.json', | ||
// overrides: {}, | ||
}, | ||
|
||
// vue: {overrides: {}}, | ||
}, { | ||
// Without a `files` scope, these rules will apply to everything. | ||
rules: { | ||
'antfu/if-newline': 'off', | ||
'no-console': 'warn', | ||
'style/arrow-parens': ['error', 'always'], | ||
'style/object-curly-spacing': ['error', 'never'], | ||
'test/prefer-lowercase-title': 'off', | ||
'ts/strict-boolean-expressions': 'off', | ||
|
||
// TODO: Try and solve broken if/else statements. | ||
/* | ||
'style/padding-line-between-statements': [ | ||
'error', | ||
{blankLine: 'never', prev: 'if', next: 'block-like'}, | ||
], | ||
*/ | ||
// TODO: Try and solve broken if/else statements. | ||
/* | ||
'style/padding-line-between-statements': [ | ||
'error', | ||
{blankLine: 'never', prev: 'if', next: 'block-like'}, | ||
], | ||
*/ | ||
}, | ||
}, | ||
}); | ||
); |
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
Oops, something went wrong.