diff --git a/changelog.md b/changelog.md index 54ba0ed..f37ba07 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.15.6] - 2024-06-11 +## Fixed ++ Fix global ignores + ## [0.15.5] - 2024-06-11 ## Fixed + Fix global ignores @@ -223,7 +227,8 @@ Update several rules ### Added - First release! -[unreleased]: https://github.com/arianrhodsandlot/eslint-config/compare/v0.15.5...HEAD +[unreleased]: https://github.com/arianrhodsandlot/eslint-config/compare/v0.15.6...HEAD +[0.15.6]: https://github.com/arianrhodsandlot/eslint-config/compare/v0.15.5...v0.15.6 [0.15.5]: https://github.com/arianrhodsandlot/eslint-config/compare/v0.15.4...v0.15.5 [0.15.4]: https://github.com/arianrhodsandlot/eslint-config/compare/v0.15.3...v0.15.4 [0.15.3]: https://github.com/arianrhodsandlot/eslint-config/compare/v0.15.2...v0.15.3 diff --git a/package.json b/package.json index 068f924..e625415 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arianrhodsandlot/eslint-config", - "version": "0.15.5", + "version": "0.15.6", "description": "A set of predefined ESLint config.", "keywords": [ "eslint", diff --git a/src/create-config.ts b/src/create-config.ts index fda9255..1c7cb0b 100644 --- a/src/create-config.ts +++ b/src/create-config.ts @@ -3,6 +3,7 @@ import _ from 'lodash' import { getCustomFlatConfigs } from './flat-configs/custom/index.js' import { getRecommendedFlatConfigs } from './flat-configs/recommended/index.js' import { + getGitIgnores, getPackageField, isPackageInstalled, isServerProject, @@ -52,7 +53,11 @@ export function createConfig( const customFlatConfig = getCustomFlatConfigs() const prepend = Array.isArray(options.prepend) ? options.prepend : [options.prepend] const append = Array.isArray(options.append) ? options.append : [options.append] - const config = [...recommendedFlatConfig, ...customFlatConfig] + const config = [ + ...recommendedFlatConfig, + ...customFlatConfig, + { ignores: ['node_modules/**/*', 'dist/**/*', '**/vendor?(s)/**/*', ...getGitIgnores()] }, + ] if (prepend) { config.unshift(...prepend) } diff --git a/src/flat-configs/recommended/base.ts b/src/flat-configs/recommended/base.ts index 8f26b1d..41a6a47 100644 --- a/src/flat-configs/recommended/base.ts +++ b/src/flat-configs/recommended/base.ts @@ -2,12 +2,11 @@ import js from '@eslint/js' import globals from 'globals' import tseslint from 'typescript-eslint' import { jsOrTsGlob } from '../../lib/constants.js' -import { getGitIgnores } from '../../lib/utils.js' import type { FlatConfigs } from '../../types/eslint.js' export const baseConfigs: FlatConfigs = [ { - ignores: ['node_modules/**/*', 'dist/**/*', '**/vendor?(s)/**/*', ...getGitIgnores()], + files: [jsOrTsGlob], languageOptions: { globals: { ...globals.browser, @@ -21,10 +20,6 @@ export const baseConfigs: FlatConfigs = [ linterOptions: { reportUnusedDisableDirectives: true }, name: 'base', }, - { - files: [jsOrTsGlob], - name: 'base', - }, { name: '@eslint/js/recommended', ...js.configs.recommended,