Skip to content

Commit

Permalink
feat: add names to configs
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Dec 6, 2024
1 parent 25a8e3a commit 71565bd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions @typescript-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const generateConfig = () => {
/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
{
name: 'ackama/@typescript-eslint',
languageOptions: { parser: parserTypeScriptESLint },
plugins: {
'@typescript-eslint': pluginTypeScriptESLint,
Expand Down
5 changes: 4 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ const configAckamaJest = require('./jest');

/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
{ files: ['**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}'] },
{ name: 'custom: files', files: ['**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}'] },
.../** @type {import('eslint').Linter.FlatConfig[]} */ (configAckamaBase),
.../** @type {import('eslint').Linter.FlatConfig[]} */ (
configAckamaTypeScript
),
{
name: 'custom: options',
languageOptions: {
parserOptions: { project: true },
globals: globals.node
Expand All @@ -20,6 +21,7 @@ const config = [
c => ({ ...c, files: ['**/*.spec.*'] })
),
{
name: 'custom: JavaScript scripts',
files: ['**/*.js'],
languageOptions: { sourceType: 'script' },
rules: {
Expand All @@ -28,6 +30,7 @@ const config = [
}
},
{
name: 'custom: declaration files',
files: ['**/*.d.ts'],
rules: {
'max-classes-per-file': 'off'
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ const generateConfig = () => {
/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
{
name: 'ackama/ignores',
ignores: [
// todo: this shouldn't be needed anymore, but we've kept it for now as it doesn't hurt
'!.eslintrc.js',
Expand All @@ -210,6 +211,7 @@ const generateConfig = () => {
]
},
{
name: 'ackama/javascript',
plugins: {
...pluginEslintCommentsConfigs.recommended.plugins,
'@stylistic/js': pluginStylisticJS,
Expand Down
1 change: 1 addition & 0 deletions jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const generateConfig = () => {
/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
{
name: 'ackama/jest',
...pluginJest.configs['flat/recommended'],
plugins: { jest: pluginJest },
rules: {
Expand Down
2 changes: 2 additions & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const generateConfig = () => {
/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
{
name: 'ackama/react',
languageOptions: {
parserOptions: {
ecmaFeatures: {
Expand Down Expand Up @@ -99,6 +100,7 @@ const generateConfig = () => {
}
},
{
name: 'ackama/react/tsx',
files: ['**/*.tsx'],
rules: {
'react/no-unknown-property': 'off',
Expand Down

0 comments on commit 71565bd

Please sign in to comment.