Skip to content

Commit

Permalink
refactor: small changes (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: Almanov Nikita <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl authored Oct 18, 2024
1 parent 88e75a3 commit 994e521
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
25 changes: 12 additions & 13 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,12 +29,18 @@ export default defineFlatConfig([
},
},
},
plugins: {
'simple-import-sort': importSortPlugin,
unicorn: unicornPlugin,
},
rules: {
'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 @@ -77,6 +77,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.

7 changes: 1 addition & 6 deletions rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { resolve } from 'node:path';

import { defineConfig } from 'rollup';

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

import { resolve } from 'node:path';
import alias from '@rollup/plugin-alias';
import typescript from '@rollup/plugin-typescript';

const sourceFolder = 'src';
const typesFolder = `${sourceFolder}/types`;

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 specs/define-config.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { describe, expectTypeOf, test as spec } from 'vitest';

import { defineConfig } from '#index';

import type { UserConfig } from '#types';

describe('Semantic Release Config', async () => {
Expand Down

0 comments on commit 994e521

Please sign in to comment.