Skip to content

Commit

Permalink
refactor(rules): add exp rules
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkeyl committed Feb 2, 2024
1 parent aee91c5 commit 9f566be
Show file tree
Hide file tree
Showing 6 changed files with 596 additions and 419 deletions.
31 changes: 17 additions & 14 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';

import globals from 'globals';

import { FlatCompat } from '@eslint/eslintrc';

import importPlugin from 'eslint-plugin-import';
import unicornPlugin from 'eslint-plugin-unicorn';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
resolvePluginsRelativeTo: __dirname,
});

export default [
...compat.extends('airbnb-base', 'plugin:unicorn/recommended'),
...compat.env({
browser: true,
node: true,
}),
...compat.plugins('import', 'unicorn'),
...compat.config({
env: {
browser: true,
es6: true,
},
parserOptions: {
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
importPlugin,
unicornPlugin,
},
extends: ['airbnb-base', 'plugin:unicorn/recommended'],
plugins: ['import', 'unicorn'],
rules: {
'no-underscore-dangle': 'warn',
'import/exports-last': 'error',
Expand All @@ -39,5 +42,5 @@ export default [
'unicorn/no-null': 'warn',
'unicorn/string-content': 'error',
},
}),
},
];
Loading

0 comments on commit 9f566be

Please sign in to comment.