Skip to content

Commit

Permalink
ci: update eslint to support esm wd-208 (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
what1s1ove authored Dec 13, 2023
1 parent 9c30e01 commit 66947b0
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 305 deletions.
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let configuration = {
extends: [`@commitlint/config-conventional`],
parserPreset: {
parserOpts: {
issuePrefixes: ProjectPrefix.APPS.map((it) => `${it}-`),
issuePrefixes: ProjectPrefix.APPS.map((prefix) => `${prefix}-`),
},
},
rules: {
Expand Down
23 changes: 6 additions & 17 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import globals from 'globals'

/** @type {import('eslint').Linter.FlatConfig} */
let ignoresConfig = {
ignores: [`build/**/*.js`],
ignores: [`build`],
}

/** @type {import('eslint').Linter.FlatConfig} */
Expand Down Expand Up @@ -81,15 +81,7 @@ let perfectionistConfig = {
plugins: {
perfectionist,
},
rules: {
...perfectionist.configs[`recommended-natural`].rules,
'perfectionist/sort-named-imports': [
`error`,
{
type: `alphabetical`,
},
],
},
rules: perfectionist.configs[`recommended-natural`].rules,
}

/** @type {import('eslint').Linter.FlatConfig} */
Expand Down Expand Up @@ -204,24 +196,21 @@ let mainRulesConfig = {
}

/** @type {import('eslint').Linter.FlatConfig[]} */
let overridesConfig = [
let overridesConfigs = [
{
files: [
`commitlint.config.js`,
`prettier.config.js`,
`lint-staged.config.js`,
`eslint.config.js`,
`stylelint.config.js`,
],
rules: {
'import/no-default-export': [`off`],
},
},
{
files: [
`eleventy.config.cjs`,
`stylelint.config.cjs`,
`.linthtmlrc.cjs`,
],
files: [`stylelint.config.cjs`, `.linthtmlrc.cjs`],
languageOptions: {
globals: globals.node,
},
Expand All @@ -245,7 +234,7 @@ let config = [
jsdocConfig,
simpleImportSortConfig,
mainRulesConfig,
...overridesConfig,
...overridesConfigs,
]

export default config
Loading

0 comments on commit 66947b0

Please sign in to comment.