Skip to content

Commit 9653c2b

Browse files
G-RathSimenB
authored andcommitted
chore(index): use export assignment for export (#373)
1 parent f41d5c4 commit 9653c2b

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
module.exports = {
4+
plugins: ['replace-ts-export-assignment'],
45
presets: [
56
'@babel/preset-typescript',
67
['@babel/preset-env', { targets: { node: 6 } }],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@typescript-eslint/eslint-plugin": "^1.13.0",
5353
"@typescript-eslint/parser": "^1.13.0",
5454
"babel-jest": "^24.8.0",
55+
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
5556
"eslint": "^5.1.0",
5657
"eslint-config-prettier": "^5.1.0",
5758
"eslint-plugin-eslint-plugin": "^2.0.0",

src/__tests__/rules.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { existsSync } from 'fs';
22
import { resolve } from 'path';
3-
// @ts-ignore
4-
import { rules } from '../';
3+
import plugin from '../';
54

6-
const ruleNames = Object.keys(rules);
5+
const ruleNames = Object.keys(plugin.rules);
76
const numberOfRules = 38;
87

98
describe('rules', () => {

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ const allRules = Object.keys(rules).reduce<Record<string, string>>(
2929
{},
3030
);
3131

32-
// eslint-disable-next-line import/no-commonjs
33-
module.exports = {
32+
export = {
3433
configs: {
3534
all: {
3635
plugins: ['jest'],

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,11 @@ babel-plugin-jest-hoist@^24.6.0:
14211421
dependencies:
14221422
"@types/babel__traverse" "^7.0.6"
14231423

1424+
babel-plugin-replace-ts-export-assignment@^0.0.2:
1425+
version "0.0.2"
1426+
resolved "https://registry.yarnpkg.com/babel-plugin-replace-ts-export-assignment/-/babel-plugin-replace-ts-export-assignment-0.0.2.tgz#927a30ba303fcf271108980a8d4f80a693e1d53f"
1427+
integrity sha512-BiTEG2Ro+O1spuheL5nB289y37FFmz0ISE6GjpNCG2JuA/WNcuEHSYw01+vN8quGf208sID3FnZFDwVyqX18YQ==
1428+
14241429
14251430
version "6.26.0"
14261431
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"

0 commit comments

Comments
 (0)