-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 29d4831
Showing
13 changed files
with
5,171 additions
and
0 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,18 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:10.11.0 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
- run: yarn install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
- run: yarn lint | ||
- run: yarn pretty-check | ||
- run: yarn test |
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 @@ | ||
node_modules |
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,17 @@ | ||
{ | ||
"extends": ["airbnb-base"], | ||
"parserOptions": { | ||
"ecmaVersion": 9 | ||
}, | ||
"env": { | ||
"jest": true, | ||
"node": true | ||
}, | ||
"rules": { | ||
"no-underscore-dangle": 0, | ||
"no-use-before-define": [ | ||
"error", | ||
{ "functions": false, "classes": true, "variables": true } | ||
] | ||
} | ||
} |
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,2 @@ | ||
node_modules | ||
.npmrc |
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,10 @@ | ||
node_modules | ||
__tests__ | ||
.circleci | ||
.git | ||
examples | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.prettierignore | ||
.prettierrc |
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 @@ | ||
node_modules |
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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,45 @@ | ||
# Remnants [](https://circleci.com/gh/MatthieuLemoine/remnants/tree/master) | ||
|
||
Find unused files. Spot these residues, leftovers, relics of an ancient past. | ||
|
||
And :fire: them. Death to legacy & dead code :skull: | ||
|
||
## Is it for me ? | ||
|
||
:recycle: Did you recently refactor parts of your awesome project ? ✅ | ||
|
||
🧓 Is your project so old (more than 2 months old) that you can't even remember why some files exist ? ✅ | ||
|
||
🏭 Is your project so bloated that you're afraid to delete a file ? ✅ | ||
|
||
**Remnants** find those relics for you so than you can :fire: them in peace. | ||
|
||
## Universal | ||
|
||
Can be used with webpack, Metro, Rollup (& more) bundled projects but also good old unbundled Node projects. | ||
|
||
## Install | ||
|
||
``` | ||
yarn global add remnants | ||
or | ||
npm i -g remnants | ||
``` | ||
|
||
## Usage | ||
|
||
In your project directory | ||
|
||
``` | ||
remnants | ||
``` | ||
|
||
## Advance usage | ||
|
||
``` | ||
remnants | ||
``` | ||
|
||
## Related | ||
|
||
If you're looking for a webpack plugin, give [unused-webpack-plugin](https://github.com/MatthieuLemoine/unused-webpack-plugin) a try. #shamelessplug |
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,3 @@ | ||
/* eslint-disable */ | ||
require = require('esm')(module); | ||
module.exports = require('./src/index'); |
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,16 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable */ | ||
const jestRuntime = require('jest-runtime'); | ||
|
||
const oldexecModule = jestRuntime.prototype._execModule; | ||
|
||
jestRuntime.prototype._execModule = function _execModule(localModule, options) { | ||
// Do not apply esm to dependencies & test files to have access to jest globals | ||
if (localModule.id.includes('node_modules') || localModule.id.includes('__tests__')) { | ||
return oldexecModule.apply(this, [localModule, options]); | ||
} | ||
localModule.exports = require('esm')(localModule)(localModule.id); | ||
return localModule; | ||
}; | ||
|
||
cli = require('jest/bin/jest'); |
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,46 @@ | ||
{ | ||
"name": "remnants", | ||
"version": "1.0.0", | ||
"description": "Find unused files. Spot these residues, leftovers, relics of an ancient past.", | ||
"main": "index.js", | ||
"module": "src/index.js", | ||
"repository": "https://github.com/MatthieuLemoine/remnants", | ||
"author": "MatthieuLemoine", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"eslint": "^5.6.1", | ||
"eslint-config-airbnb-base": "^13.1.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"husky": "^1.1.1", | ||
"jest": "^23.6.0", | ||
"lint-staged": "^7.3.0", | ||
"prettier": "^1.14.3", | ||
"prettier-eslint-cli": "^4.7.1" | ||
}, | ||
"scripts": { | ||
"test": "./jest.js", | ||
"lint": "eslint .", | ||
"prettify": "prettier-eslint --write \"**/*.js*\" --list-different", | ||
"pretty-check": "prettier-eslint \"**/*.js*\" --list-different", | ||
"check-version": "node scripts/check-version.js" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"linters": { | ||
"*.js": [ | ||
"prettier-eslint --write --config .prettierrc", | ||
"eslint --fix", | ||
"git add" | ||
], | ||
"*.json": [ | ||
"prettier-eslint --write --config .prettierrc", | ||
"git add" | ||
] | ||
} | ||
} | ||
} |
Empty file.
Oops, something went wrong.