Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: move globals into json file (#366)
  • Loading branch information
G-Rath authored and SimenB committed Aug 6, 2019
1 parent 8dcfc24 commit d285f8b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
@@ -1,6 +1,6 @@
'use strict';

const { globals } = require('./').environments.globals;
const globals = require('./src/globals.json');

module.exports = {
parser: '@typescript-eslint/parser',
Expand Down
19 changes: 19 additions & 0 deletions src/globals.json
@@ -0,0 +1,19 @@
{
"afterAll": false,
"afterEach": false,
"beforeAll": false,
"beforeEach": false,
"describe": false,
"expect": false,
"fit": false,
"it": false,
"jasmine": false,
"jest": false,
"pending": false,
"pit": false,
"require": false,
"test": false,
"xdescribe": false,
"xit": false,
"xtest": false
}
21 changes: 2 additions & 19 deletions src/index.js
@@ -1,5 +1,6 @@
import { readdirSync } from 'fs';
import { basename, join } from 'path';
import globals from './globals.json';
import * as snapshotProcessor from './processors/snapshot-processor';

// copied from https://github.com/babel/babel/blob/d8da63c929f2d28c401571e2a43166678c555bc4/packages/babel-helpers/src/helpers.js#L602-L606
Expand Down Expand Up @@ -74,25 +75,7 @@ module.exports = {
},
environments: {
globals: {
globals: {
afterAll: false,
afterEach: false,
beforeAll: false,
beforeEach: false,
describe: false,
expect: false,
fit: false,
it: false,
jasmine: false,
jest: false,
pending: false,
pit: false,
require: false,
test: false,
xdescribe: false,
xit: false,
xtest: false,
},
globals,
},
},
processors: {
Expand Down

0 comments on commit d285f8b

Please sign in to comment.