mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-25 13:31:24 +01:00
merge completed... now to fix all the bugs...
This commit is contained in:
commit
87c4d80fbc
3472 changed files with 466748 additions and 6517 deletions
32
node_modules/eslint-config-airbnb-base/test/test-base.js
generated
vendored
Normal file
32
node_modules/eslint-config-airbnb-base/test/test-base.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import test from 'tape';
|
||||
|
||||
import index from '..';
|
||||
|
||||
const files = { ...{ index } }; // object spread is to test parsing
|
||||
|
||||
fs.readdirSync(path.join(__dirname, '../rules')).forEach((name) => {
|
||||
// eslint-disable-next-line import/no-dynamic-require
|
||||
files[name] = require(`../rules/${name}`); // eslint-disable-line global-require
|
||||
});
|
||||
|
||||
Object.keys(files).forEach((
|
||||
name, // trailing function comma is to test parsing
|
||||
) => {
|
||||
const config = files[name];
|
||||
|
||||
test(`${name}: does not reference react`, (t) => {
|
||||
t.plan(2);
|
||||
|
||||
// scan plugins for react and fail if it is found
|
||||
const hasReactPlugin = Object.prototype.hasOwnProperty.call(config, 'plugins')
|
||||
&& config.plugins.indexOf('react') !== -1;
|
||||
t.notOk(hasReactPlugin, 'there is no react plugin');
|
||||
|
||||
// scan rules for react/ and fail if any exist
|
||||
const reactRuleIds = Object.keys(config.rules)
|
||||
.filter((ruleId) => ruleId.indexOf('react/') === 0);
|
||||
t.deepEquals(reactRuleIds, [], 'there are no react/ rules');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue