-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,050 additions
and
1,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import base from '../base' | ||
|
||
describe('base config', () => { | ||
it('extends files', () => { | ||
const expected = [ | ||
'airbnb/base', | ||
'plugin:wyze/recommended', | ||
'wyze/rules/best-practices', | ||
'wyze/rules/es6', | ||
'wyze/rules/import', | ||
'wyze/rules/legacy', | ||
'wyze/rules/style', | ||
] | ||
|
||
expect(base.extends).toEqual(expected) | ||
}) | ||
|
||
it('specifies plugins', () => { | ||
const expected = [ | ||
'import', | ||
'wyze', | ||
] | ||
|
||
expect(base.plugins).toEqual(expected) | ||
}) | ||
|
||
it('sets parserOptions correcty', () => { | ||
const expected = { | ||
ecmaFeatures: { | ||
experimentalObjectRestSpread: true, | ||
}, | ||
ecmaVersion: 2017, | ||
sourceType: 'module', | ||
} | ||
|
||
expect(base.parserOptions).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import flow from '../flow' | ||
|
||
describe('flow config', () => { | ||
it('extends files', () => { | ||
const expected = [ | ||
'plugin:flowtype/recommended', | ||
'wyze/rules/flow', | ||
] | ||
|
||
expect(flow.extends).toEqual(expected) | ||
}) | ||
|
||
it('sets parser correctly', () => { | ||
const expected = 'babel-eslint' | ||
|
||
expect(flow.parser).toBe(expected) | ||
}) | ||
|
||
it('sets plugins correctly', () => { | ||
const expected = [ | ||
'flowtype', | ||
] | ||
|
||
expect(flow.plugins).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import main from '../' | ||
|
||
describe('main config', () => { | ||
it('extends files', () => { | ||
const expected = [ | ||
'airbnb', | ||
'wyze/base', | ||
'wyze/rules/react', | ||
] | ||
|
||
expect(main.extends).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import preact from '../preact' | ||
|
||
describe('preact config', () => { | ||
it('extends files', () => { | ||
const expected = [ | ||
'wyze', | ||
'wyze/rules/preact', | ||
] | ||
|
||
expect(preact.extends).toEqual(expected) | ||
}) | ||
|
||
it('sets settings correctly', () => { | ||
const expected = { | ||
react: { | ||
createClass: 'h', | ||
pragma: 'preact', | ||
version: '6.0', | ||
}, | ||
} | ||
|
||
expect(preact.settings).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../best-practices' | ||
|
||
describe('best practices rules', () => { | ||
it('contains no plugin rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^[^/]+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../es6' | ||
|
||
describe('es6 rules', () => { | ||
it('contains no plugin rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^[^/]+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../flow' | ||
|
||
describe('flow rules', () => { | ||
it('only flowtype rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^flowtype\/.+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../import' | ||
|
||
describe('import rules', () => { | ||
it('contains only import rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^import\/.+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../legacy' | ||
|
||
describe('legacy rules', () => { | ||
it('contains no plugin rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^[^/]+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../preact' | ||
|
||
describe('preact rules', () => { | ||
it('contains only react rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^react\/.+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../react' | ||
|
||
describe('react rules', () => { | ||
it('contains only react rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^react\/.+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../style' | ||
|
||
describe('style rules', () => { | ||
it('contains no plugin rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^[^/]+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { rules } from '../variables' | ||
|
||
describe('variables rules', () => { | ||
it('contains no plugin rules', () => { | ||
const keys = Object.keys(rules) | ||
const expected = Array.from( | ||
keys, () => expect.stringMatching(/^[^/]+$/), | ||
) | ||
|
||
expect(keys).toEqual(expected) | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.