Skip to content

Commit

Permalink
refactor: small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkeyl committed Oct 18, 2024
1 parent d63f004 commit 4de615a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
26 changes: 12 additions & 14 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
import { defineFlatConfig } from 'eslint-define-config';
import { extend } from '@archoleat/eslint-flat-compatibility';

import globals from 'globals';

import importSortPlugin from 'eslint-plugin-simple-import-sort';
import parser from '@typescript-eslint/parser';
import prettierConfig from 'eslint-config-prettier';
import unicornPlugin from 'eslint-plugin-unicorn';

import parser from '@typescript-eslint/parser';

export default defineFlatConfig([
...extend(
'airbnb-base',
'airbnb-typescript/base',
'plugin:import/recommended',
'plugin:import/typescript',
),
unicornPlugin.configs['flat/recommended'],
...extend('airbnb-base', 'airbnb-typescript/base'),
{
files: ['src/**/*.ts'],
languageOptions: {
parser,
ecmaVersion: 'latest',
globals: {
...globals.node,
...globals.es2015,
},
parserOptions: {
ecmaVersion: 'latest',
project: 'tsconfig.json',
},
sourceType: 'module',
Expand All @@ -36,13 +29,18 @@ export default defineFlatConfig([
},
},
},
plugins: {
'simple-import-sort': importSortPlugin,
unicorn: unicornPlugin,
},
rules: {
'prefer-regex-literals': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'import/exports-last': 'error',
'import/extensions': ['error', { ts: 'always' }],
'import/group-exports': 'error',
'import/no-commonjs': 'error',
'import/no-default-export': 'error',
'import/no-default-export': 'off',
'import/no-namespace': 'error',
'import/no-unassigned-import': 'error',
'import/prefer-default-export': 'off',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"eslint-define-config": "^2.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^56.0.0",
"git-pull-run": "^1.4.0",
"globals": "^15.11.0",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import { resolve } from 'node:path';

import { defineConfig } from 'rollup';

import { dts } from 'rollup-plugin-dts';
import { minify } from 'rollup-plugin-esbuild';

import alias from '@rollup/plugin-alias';
import typescript from '@rollup/plugin-typescript';

const sourceFolder = 'src';
const appFolder = `${sourceFolder}/app`;
const sharedFolder = `${sourceFolder}/shared`;

const fileFormat = 'es';
const fileName = 'index';

const declarationFile = `${fileName}.d.ts`;
const entryFile = `${fileName}.ts`;
const outputFile = `${fileName}.js`;
Expand Down
1 change: 0 additions & 1 deletion src/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { FONT_FILE_NAME_REGEX } from './font-file-name.ts';

export { selectors } from './selectors.ts';

0 comments on commit 4de615a

Please sign in to comment.