generated from sapphiredev/sapphire-template
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint-plugin-result)!: update to eslint v9 flat config
BREAKING CHANGE: This plugin now requires eslint v9 or higher. For more information see the [eslint migration guide](https://eslint.org/blog/2024/04/eslint-v9.0.0-released) and [flat config guide](https://eslint.org/blog/2022/08/new-config-system-part-2/). The README of this package has instructions for how to use this package with the new flat config system.
- Loading branch information
Showing
11 changed files
with
141 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
export const recommendedConfig = { | ||
plugins: ['@sapphire/eslint-plugin-result'], | ||
import type { TSESLint } from '@typescript-eslint/utils'; | ||
import sapphireEslintPluginResult from '../index'; | ||
|
||
const recommendedConfig: TSESLint.FlatConfig.Config = { | ||
plugins: { | ||
result: sapphireEslintPluginResult | ||
}, | ||
rules: { | ||
'@sapphire/result/no-discard-result': 'error' | ||
} | ||
}; | ||
|
||
export default recommendedConfig; |
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 was deleted.
Oops, something went wrong.
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,4 @@ | ||
import * as vitest from 'vitest'; | ||
import { RuleTester } from '@typescript-eslint/rule-tester'; | ||
|
||
RuleTester.afterAll = vitest.afterAll; |
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,13 +1,14 @@ | ||
import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector'; | ||
import { Options } from 'tsup'; | ||
import { createTsupConfig } from '../../scripts/tsup.config'; | ||
|
||
const options: Options = { | ||
sourcemap: false, | ||
dts: false | ||
const defaultOptions: Options = { | ||
entry: ['src/index.ts', 'src/configs/recommended.ts'], | ||
esbuildPlugins: [esbuildPluginVersionInjector()] | ||
}; | ||
|
||
export default createTsupConfig({ | ||
cjsOptions: options, | ||
esmOptions: options, | ||
cjsOptions: defaultOptions, | ||
esmOptions: defaultOptions, | ||
iifeOptions: { disabled: true } | ||
}); |
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,3 +1,7 @@ | ||
import { createVitestConfig } from '../../scripts/vitest.config'; | ||
|
||
export default createVitestConfig(); | ||
export default createVitestConfig({ | ||
test: { | ||
setupFiles: ['./tests/vitest.setup.ts'] | ||
} | ||
}); |