Skip to content

Commit

Permalink
Chore: use incredible eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed May 3, 2021
1 parent 3a8036a commit b03d74a
Show file tree
Hide file tree
Showing 8 changed files with 348 additions and 2,741 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

21 changes: 3 additions & 18 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
{
"extends": "webbylab",
"env": {
"browser": true
},
"rules": {
"import/no-commonjs": 0,
"func-names": 0,
"func-style": 0,
"prefer-arrow-callback": 0,
"linebreak-style": 0,
"max-len": ["error", {
"comments": 800,
"code": 120,
"ignoreUrls": true,
"ignoreTemplateLiterals": true,
"ignoreStrings": true
} ]
}
"extends": [
"incredible"
]
}
1 change: 1 addition & 0 deletions bin/pack-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async function run() {
} finally {
// await fs.move(backup, path.resolve('tests/entry.js'), { overwrite: true });
}

console.log('Done');
process.exit(0);
} catch (error) {
Expand Down
3,023 changes: 323 additions & 2,700 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "boilerplate for creating npm packages",
"main": "./lib",
"scripts": {
"prepare": "babel src --out-dir ./lib && husky install",
"prepare": "babel src --out-dir ./lib --copy-files && husky install",
"coveralls": "cat ./reports/coverage/lcov.info | coveralls",
"test:security": "npm audit && npm run test:lock",
"test:lint": "eslint src bin tests",
Expand Down Expand Up @@ -51,21 +51,18 @@
"@semantic-release/github": "^7.2.1",
"@semantic-release/npm": "^7.0.0",
"@semantic-release/release-notes-generator": "^9.0.0",
"babel-eslint": "^10.0.1",
"babel-plugin-module-resolver": "^4.0.0",
"chai": "^4.2.0",
"chance": "^1.0.18",
"conventional-changelog-eslint": "^3.0.1",
"coveralls": "^3.0.3",
"danger": "^10.6.4",
"eslint": "^7.0.0",
"eslint-config-webbylab": "^4.0.0",
"eslint-plugin-fetch": "0.0.1",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-more": "^0.3.2",
"eslint-plugin-no-require-lodash": "^1.1.0",
"eslint-plugin-prefer-spread": "^1.0.3",
"eslint-plugin-react": "^7.12.4",
"eslint-config-incredible": "^1.0.0",
"eslint-plugin-censor": "^1.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-more": "^1.0.3",
"eslint-plugin-security": "^1.4.0",
"fs-extra": "^8.1.0",
"husky": "^6.0.0",
"jscpd": "^3.3.25",
Expand Down
1 change: 1 addition & 0 deletions tests/Test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default class Test {
async setTmpFolder() {
await fse.ensureDir(tmpFolder);
}

async cleanTmpFolder() {
await fse.remove(tmpFolder);
}
Expand Down
25 changes: 13 additions & 12 deletions tests/entry.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import path from 'path';

const isBuild = process.env.BUILD && [ '1', 'true' ].includes(process.env.BUILD);
const entry = process.env.ENTRY && path.resolve(process.env.ENTRY)
|| isBuild && path.resolve(__dirname, '../lib')
|| path.resolve(__dirname, '../src');

export default require(entry);

export function _load(relPath) {
return require(path.join(entry, relPath));
}
/* eslint-disable security/detect-non-literal-require */
import path from 'path';

const isBuild = process.env.BUILD && [ '1', 'true' ].includes(process.env.BUILD);
const entry = process.env.ENTRY && path.resolve(process.env.ENTRY)
|| isBuild && path.resolve(__dirname, '../lib')
|| path.resolve(__dirname, '../src');

export default require(entry);

export function _load(relPath) {
return require(path.join(entry, relPath));
}
2 changes: 1 addition & 1 deletion tests/test.env.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
process.env.MODE = 'test';
process.env.MODE = 'test';

0 comments on commit b03d74a

Please sign in to comment.