A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/antfu/eslint-config/commit/d4cfef8 below:

add `name` for each config item · antfu/eslint-config@d4cfef8 · GitHub

File tree Expand file treeCollapse file tree 22 files changed

+135

-35

lines changed

Filter options

Expand file treeCollapse file tree 22 files changed

+135

-35

lines changed Original file line number Diff line number Diff line change

@@ -64,6 +64,7 @@

64 64

"devDependencies": {

65 65

"@antfu/eslint-config": "workspace:*",

66 66

"@antfu/ni": "^0.21.8",

67 +

"@types/eslint": "^8.44.3",

67 68

"@types/fs-extra": "^11.0.2",

68 69

"@types/node": "^20.7.1",

69 70

"bumpp": "^9.2.0",

Original file line number Diff line number Diff line change

@@ -1,9 +1,10 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem } from '../types'

2 2

import { pluginComments } from '../plugins'

3 3 4 4

export function comments(): FlatESLintConfigItem[] {

5 5

return [

6 6

{

7 +

name: 'antfu:eslint-comments',

7 8

plugins: {

8 9

'eslint-comments': pluginComments,

9 10

},

Original file line number Diff line number Diff line change

@@ -1,8 +1,11 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem } from '../types'

2 2

import { GLOB_EXCLUDE } from '../globs'

3 3 4 4

export function ignores(): FlatESLintConfigItem[] {

5 5

return [

6 -

{ ignores: GLOB_EXCLUDE },

6 +

{

7 +

ignores: GLOB_EXCLUDE,

8 +

name: 'antfu:ignores:basic',

9 +

},

7 10

]

8 11

}

Original file line number Diff line number Diff line change

@@ -1,6 +1,5 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem, OptionsStylistic } from '../types'

2 2

import { pluginAntfu, pluginImport } from '../plugins'

3 -

import type { OptionsStylistic } from '../types'

4 3 5 4

export function imports(options: OptionsStylistic = {}): FlatESLintConfigItem[] {

6 5

const {

@@ -9,6 +8,7 @@ export function imports(options: OptionsStylistic = {}): FlatESLintConfigItem[]

9 8 10 9

return [

11 10

{

11 +

name: 'antfu:imports',

12 12

plugins: {

13 13

antfu: pluginAntfu,

14 14

import: pluginImport,

Original file line number Diff line number Diff line change

@@ -1,8 +1,7 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

2 1

import globals from 'globals'

2 +

import type { FlatESLintConfigItem, OptionsIsInEditor, OptionsOverrides } from '../types'

3 3

import { pluginAntfu, pluginUnusedImports } from '../plugins'

4 4

import { OFF } from '../flags'

5 -

import type { OptionsIsInEditor, OptionsOverrides } from '../types'

6 5

import { GLOB_SRC, GLOB_SRC_EXT } from '../globs'

7 6 8 7

export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}): FlatESLintConfigItem[] {

@@ -32,6 +31,7 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):

32 31

},

33 32

sourceType: 'module',

34 33

},

34 +

name: 'antfu:javascript',

35 35

plugins: {

36 36

'antfu': pluginAntfu,

37 37

'unused-imports': pluginUnusedImports,

@@ -231,6 +231,7 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):

231 231

},

232 232

{

233 233

files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],

234 +

name: 'antfu:scripts-overrides',

234 235

rules: {

235 236

'no-console': OFF,

236 237

},

Original file line number Diff line number Diff line change

@@ -1,6 +1,5 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem, OptionsStylistic } from '../types'

2 2

import { pluginJsdoc } from '../plugins'

3 -

import type { OptionsStylistic } from '../types'

4 3 5 4

export function jsdoc(options: OptionsStylistic = {}): FlatESLintConfigItem[] {

6 5

const {

@@ -9,6 +8,7 @@ export function jsdoc(options: OptionsStylistic = {}): FlatESLintConfigItem[] {

9 8 10 9

return [

11 10

{

11 +

name: 'antfu:jsdoc',

12 12

plugins: {

13 13

jsdoc: pluginJsdoc,

14 14

},

Original file line number Diff line number Diff line change

@@ -1,7 +1,6 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem, OptionsOverrides, OptionsStylistic } from '../types'

2 2

import { GLOB_JSON, GLOB_JSON5, GLOB_JSONC } from '../globs'

3 3

import { parserJsonc, pluginJsonc } from '../plugins'

4 -

import type { OptionsOverrides, OptionsStylistic } from '../types'

5 4 6 5

export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatESLintConfigItem[] {

7 6

const {

@@ -11,6 +10,7 @@ export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatES

11 10 12 11

return [

13 12

{

13 +

name: 'antfu:jsonc:setup',

14 14

plugins: {

15 15

jsonc: pluginJsonc as any,

16 16

},

@@ -20,8 +20,8 @@ export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatES

20 20

languageOptions: {

21 21

parser: parserJsonc,

22 22

},

23 +

name: 'antfu:jsonc:rules',

23 24

rules: {

24 - 25 25

'jsonc/no-bigint-literals': 'error',

26 26

'jsonc/no-binary-expression': 'error',

27 27

'jsonc/no-binary-numeric-literals': 'error',

Original file line number Diff line number Diff line change

@@ -1,8 +1,7 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem, OptionsComponentExts, OptionsOverrides } from '../types'

2 2

import { GLOB_MARKDOWN, GLOB_MARKDOWN_CODE } from '../globs'

3 3

import { pluginMarkdown } from '../plugins'

4 4

import { OFF } from '../flags'

5 -

import type { OptionsComponentExts, OptionsOverrides } from '../types'

6 5 7 6

export function markdown(options: OptionsComponentExts & OptionsOverrides = {}): FlatESLintConfigItem[] {

8 7

const {

@@ -12,12 +11,14 @@ export function markdown(options: OptionsComponentExts & OptionsOverrides = {}):

12 11 13 12

return [

14 13

{

14 +

name: 'antfu:markdown:setup',

15 15

plugins: {

16 16

markdown: pluginMarkdown,

17 17

},

18 18

},

19 19

{

20 20

files: [GLOB_MARKDOWN],

21 +

name: 'antfu:markdown:processor',

21 22

processor: 'markdown/markdown',

22 23

},

23 24

{

@@ -32,6 +33,7 @@ export function markdown(options: OptionsComponentExts & OptionsOverrides = {}):

32 33

},

33 34

},

34 35

},

36 +

name: 'antfu:markdown:rules',

35 37

rules: {

36 38

'antfu/no-cjs-exports': OFF,

37 39

'antfu/no-ts-export-equal': OFF,

Original file line number Diff line number Diff line change

@@ -1,9 +1,10 @@

1 -

import type { FlatESLintConfigItem } from 'eslint-define-config'

1 +

import type { FlatESLintConfigItem } from '../types'

2 2

import { pluginNode } from '../plugins'

3 3 4 4

export function node(): FlatESLintConfigItem[] {

5 5

return [

6 6

{

7 +

name: 'antfu:node',

7 8

plugins: {

8 9

node: pluginNode,

9 10

},

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4