Skip to content

Commit

Permalink
update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
yuheiy committed May 1, 2024
1 parent 3bc8d0e commit a678214
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import astro from 'eslint-plugin-astro';
import tailwindcss from 'eslint-plugin-tailwindcss';

const tailwindcssConfig = {
languageOptions: {
parserOptions: tailwindcss.configs.recommended.parserOptions,
},
plugins: {
tailwindcss,
},
rules: tailwindcss.configs.recommended.rules,
};

export default [
// globally ignoring
{
Expand All @@ -10,22 +20,17 @@ export default [
// global configurations
{
linterOptions: {
reportUnusedDisableDirectives: 'error',
reportUnusedDisableDirectives: 'warn',
},
},

// eslint-plugin-astro
...astro.configs['flat/jsx-a11y-recommended'],

// eslint-plugin-tailwindcss
tailwindcssConfig,
{
languageOptions: {
parserOptions: tailwindcss.configs.recommended.parserOptions,
},
plugins: { tailwindcss },
rules: {
...tailwindcss.configs.recommended.rules,

// use prettier-plugin-tailwindcss for class sorting
'tailwindcss/classnames-order': 'off',
},
Expand Down

0 comments on commit a678214

Please sign in to comment.