Skip to content

Commit

Permalink
chore(index): use export assignment for export (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored and SimenB committed Aug 9, 2019
1 parent f41d5c4 commit 9653c2b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions babel.config.js
@@ -1,6 +1,7 @@
'use strict';

module.exports = {
plugins: ['replace-ts-export-assignment'],
presets: [
'@babel/preset-typescript',
['@babel/preset-env', { targets: { node: 6 } }],
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -52,6 +52,7 @@
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"babel-jest": "^24.8.0",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"eslint": "^5.1.0",
"eslint-config-prettier": "^5.1.0",
"eslint-plugin-eslint-plugin": "^2.0.0",
Expand Down
5 changes: 2 additions & 3 deletions src/__tests__/rules.test.ts
@@ -1,9 +1,8 @@
import { existsSync } from 'fs';
import { resolve } from 'path';
// @ts-ignore
import { rules } from '../';
import plugin from '../';

const ruleNames = Object.keys(rules);
const ruleNames = Object.keys(plugin.rules);
const numberOfRules = 38;

describe('rules', () => {
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Expand Up @@ -29,8 +29,7 @@ const allRules = Object.keys(rules).reduce<Record<string, string>>(
{},
);

// eslint-disable-next-line import/no-commonjs
module.exports = {
export = {
configs: {
all: {
plugins: ['jest'],
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -1421,6 +1421,11 @@ babel-plugin-jest-hoist@^24.6.0:
dependencies:
"@types/babel__traverse" "^7.0.6"

babel-plugin-replace-ts-export-assignment@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-replace-ts-export-assignment/-/babel-plugin-replace-ts-export-assignment-0.0.2.tgz#927a30ba303fcf271108980a8d4f80a693e1d53f"
integrity sha512-BiTEG2Ro+O1spuheL5nB289y37FFmz0ISE6GjpNCG2JuA/WNcuEHSYw01+vN8quGf208sID3FnZFDwVyqX18YQ==

babel-polyfill@6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
Expand Down

0 comments on commit 9653c2b

Please sign in to comment.