Skip to content

Commit

Permalink
Merge branch 'main' into default-theme-image-transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Sep 8, 2024
2 parents 062a779 + d3a5972 commit e57f000
Show file tree
Hide file tree
Showing 11 changed files with 218 additions and 136 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

42 changes: 0 additions & 42 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* Upgrade development Node.js to v20 LTS ([#359](https://github.com/marp-team/marp-core/pull/359))
* Upgrade dependent packages to the latest version ([#380](https://github.com/marp-team/marp-core/pull/380))
* Switch package manager from yarn to npm ([#379](https://github.com/marp-team/marp-core/pull/379))
* Migrate ESLint config to Flat config ([#385](https://github.com/marp-team/marp-core/pull/385))
### Fixed
Expand Down
60 changes: 60 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import eslintPluginImportX from 'eslint-plugin-import-x'
import eslintPluginJest from 'eslint-plugin-jest'
import globals from 'globals'
import tseslint from 'typescript-eslint'

const tsFiles = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']
const testFiles = ['test/**']
const forFiles = (files, confs) => confs.map((conf) => ({ ...conf, files }))

export default tseslint.config(
js.configs.recommended,
eslintPluginImportX.flatConfigs.recommended,
...forFiles(tsFiles, [
...tseslint.configs.recommended,
eslintPluginImportX.flatConfigs.typescript,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
]),
...forFiles(testFiles, [
eslintPluginJest.configs['flat/recommended'],
eslintPluginJest.configs['flat/style'],
]),
eslintConfigPrettier,
{
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.node,
...globals.browser,
},
},
rules: {
'import-x/order': ['error', { alphabetize: { order: 'asc' } }],
},
settings: {
'import-x/resolver': 'typescript',
},
},
{
ignores: [
'browser.d.ts',
'coverage/**/*',
'lib/**/*',
'node_modules/**/*',
'sandbox/**/*',
'tmp/**/*',
'types/**/*',
],
},
)
Loading

0 comments on commit e57f000

Please sign in to comment.