Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use export assignment #373

Merged
merged 4 commits into from Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.1",
"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
11 changes: 10 additions & 1 deletion yarn.lock
Expand Up @@ -26,7 +26,7 @@
dependencies:
"@babel/highlight" "^7.0.0"

"@babel/core@^7.1.0", "@babel/core@^7.4.4":
"@babel/core@^7.1.0", "@babel/core@^7.4.4", "@babel/core@^7.5.5":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30"
integrity sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==
Expand Down Expand Up @@ -1421,6 +1421,15 @@ babel-plugin-jest-hoist@^24.6.0:
dependencies:
"@types/babel__traverse" "^7.0.6"

babel-plugin-replace-ts-export-assignment@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/babel-plugin-replace-ts-export-assignment/-/babel-plugin-replace-ts-export-assignment-0.0.1.tgz#78305d7e15fe1cbfff7bbbfdf7f0cf92f21a15d6"
integrity sha512-YBhWpHLAveoXQSDiiU0lk1pPDHKeBpDTcwjUTdzFOTe40kAGxcSM+XvD7Vp6SP9D79eBKNHgG5Ji3cigPjAcfw==
dependencies:
"@babel/core" "^7.5.5"
G-Rath marked this conversation as resolved.
Show resolved Hide resolved
"@babel/template" "^7.4.4"
"@babel/types" "^7.5.5"

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