File tree Expand file tree Collapse file tree 3 files changed +21
-66
lines changed Expand file tree Collapse file tree 3 files changed +21
-66
lines changed Original file line number Diff line number Diff line change 12
12
13
13
[ ![ Travis] ( https://img.shields.io/travis/com/rx-ts/eslint-mdx.svg )] ( https://travis-ci.com/rx-ts/eslint-mdx )
14
14
[ ![ Codecov] ( https://img.shields.io/codecov/c/gh/rx-ts/eslint-mdx )] ( https://codecov.io/gh/rx-ts/eslint-mdx )
15
- [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint-mdx%2Fmaster%2Fpackage.json )] ( https://github.com/rx-ts/eslint-mdx )
15
+ [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint-mdx%2Fmaster%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
16
16
[ ![ GitHub release] ( https://img.shields.io/github/release/rx-ts/eslint-mdx )] ( https://github.com/rx-ts/eslint-mdx/releases )
17
17
[ ![ David Dev] ( https://img.shields.io/david/dev/rx-ts/eslint-mdx.svg )] ( https://david-dm.org/rx-ts/eslint-mdx?type=dev )
18
18
[ ![ Conventional Commits] ( https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg )] ( https://conventionalcommits.org )
@@ -67,33 +67,18 @@ npm i -D @rxts/eslint-plugin-mdx
67
67
2 . If you're using `eslint@^5.0.0`, you need to enable this parser/plugin manually, because `eslint@5` does not support `extends` for `overrides` property in its configuration:
68
68
69
69
```js
70
+ const { configs } = require('@rxts/eslint-plugin-mdx')
70
71
const rebass = require('rebass')
71
72
72
73
module.exports = {
73
74
extends: ['plugin:@rxts/mdx/recommended'],
74
75
overrides: [
75
- {
76
- files: ['*.mdx'],
77
- globals: Object.keys(rebass).reduce(
78
- (globals, Component) =>
79
- Object.assign(globals, {
80
- [Component ]: false,
81
- }),
82
- {
83
- React: false,
84
- },
85
- ),
86
- rules: {
87
- 'lines-between-class-members': 0,
88
- 'react/jsx-no-undef': [
89
- 2 ,
90
- {
91
- allowGlobals: true,
92
- },
93
- ],
94
- 'react/react-in-jsx-scope': 0,
76
+ Object.assign(
77
+ {
78
+ files: ['*.mdx'],
95
79
},
96
- },
80
+ configs.overrides,
81
+ ),
97
82
],
98
83
}
99
84
```
Original file line number Diff line number Diff line change 12
12
13
13
[ ![ Travis] ( https://img.shields.io/travis/com/rx-ts/eslint-mdx.svg )] ( https://travis-ci.com/rx-ts/eslint-mdx )
14
14
[ ![ Codecov] ( https://img.shields.io/codecov/c/gh/rx-ts/eslint-mdx )] ( https://codecov.io/gh/rx-ts/eslint-mdx )
15
- [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint-mdx%2Fmaster%2Fpackage.json )] ( https://github.com/rx-ts/eslint-mdx )
15
+ [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint-mdx%2Fmaster%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
16
16
[ ![ GitHub release] ( https://img.shields.io/github/release/rx-ts/eslint-mdx )] ( https://github.com/rx-ts/eslint-mdx/releases )
17
17
[ ![ David Dev] ( https://img.shields.io/david/dev/rx-ts/eslint-mdx.svg )] ( https://david-dm.org/rx-ts/eslint-mdx?type=dev )
18
18
[ ![ Conventional Commits] ( https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg )] ( https://conventionalcommits.org )
@@ -67,33 +67,18 @@ npm i -D @rxts/eslint-plugin-mdx
67
67
2 . If you're using `eslint@^5.0.0`, you need to enable this parser/plugin manually, because `eslint@5` does not support `extends` for `overrides` property in its configuration:
68
68
69
69
```js
70
+ const { configs } = require('@rxts/eslint-plugin-mdx')
70
71
const rebass = require('rebass')
71
72
72
73
module.exports = {
73
74
extends: ['plugin:@rxts/mdx/recommended'],
74
75
overrides: [
75
- {
76
- files: ['*.mdx'],
77
- globals: Object.keys(rebass).reduce(
78
- (globals, Component) =>
79
- Object.assign(globals, {
80
- [Component ]: false,
81
- }),
82
- {
83
- React: false,
84
- },
85
- ),
86
- rules: {
87
- 'lines-between-class-members': 0,
88
- 'react/jsx-no-undef': [
89
- 2 ,
90
- {
91
- allowGlobals: true,
92
- },
93
- ],
94
- 'react/react-in-jsx-scope': 0,
76
+ Object.assign(
77
+ {
78
+ files: ['*.mdx'],
95
79
},
96
- },
80
+ configs.overrides,
81
+ ),
97
82
],
98
83
}
99
84
```
Original file line number Diff line number Diff line change 12
12
13
13
[ ![ Travis] ( https://img.shields.io/travis/com/rx-ts/eslint-mdx.svg )] ( https://travis-ci.com/rx-ts/eslint-mdx )
14
14
[ ![ Codecov] ( https://img.shields.io/codecov/c/gh/rx-ts/eslint-mdx )] ( https://codecov.io/gh/rx-ts/eslint-mdx )
15
- [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint-mdx%2Fmaster%2Fpackage.json )] ( https://github.com/rx-ts/eslint-mdx )
15
+ [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint-mdx%2Fmaster%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
16
16
[ ![ GitHub release] ( https://img.shields.io/github/release/rx-ts/eslint-mdx )] ( https://github.com/rx-ts/eslint-mdx/releases )
17
17
[ ![ David Dev] ( https://img.shields.io/david/dev/rx-ts/eslint-mdx.svg )] ( https://david-dm.org/rx-ts/eslint-mdx?type=dev )
18
18
[ ![ Conventional Commits] ( https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg )] ( https://conventionalcommits.org )
@@ -67,33 +67,18 @@ npm i -D @rxts/eslint-plugin-mdx
67
67
2 . If you're using `eslint@^5.0.0`, you need to enable this parser/plugin manually, because `eslint@5` does not support `extends` for `overrides` property in its configuration:
68
68
69
69
```js
70
+ const { configs } = require('@rxts/eslint-plugin-mdx')
70
71
const rebass = require('rebass')
71
72
72
73
module.exports = {
73
74
extends: ['plugin:@rxts/mdx/recommended'],
74
75
overrides: [
75
- {
76
- files: ['*.mdx'],
77
- globals: Object.keys(rebass).reduce(
78
- (globals, Component) =>
79
- Object.assign(globals, {
80
- [Component ]: false,
81
- }),
82
- {
83
- React: false,
84
- },
85
- ),
86
- rules: {
87
- 'lines-between-class-members': 0,
88
- 'react/jsx-no-undef': [
89
- 2 ,
90
- {
91
- allowGlobals: true,
92
- },
93
- ],
94
- 'react/react-in-jsx-scope': 0,
76
+ Object.assign(
77
+ {
78
+ files: ['*.mdx'],
95
79
},
96
- },
80
+ configs.overrides,
81
+ ),
97
82
],
98
83
}
99
84
```
You can’t perform that action at this time.
0 commit comments