Skip to content

Commit 92ce435

Browse files
author
Robert Jackson
authored
Make it Work (#2)
Make it Work
2 parents 670f365 + d72619e commit 92ce435

113 files changed

Lines changed: 32833 additions & 62 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_size = 2
6+
indent_style = space

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/__testfixtures__/**/*.js
2+
**/fixtures/**

.eslintrc.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
ecmaVersion: 2017
5+
},
6+
env: {
7+
node: true,
8+
es6: true
9+
},
10+
extends: ["eslint:recommended", "prettier"],
11+
plugins: ["prettier"],
12+
rules: {
13+
"prettier/prettier": "error"
14+
},
15+
overrides: [
16+
{
17+
files: ['**/*.test.js'],
18+
env: {
19+
jest: true
20+
}
21+
}
22+
]
23+
};

.gitignore

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (https://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
36-
node_modules/
37-
jspm_packages/
38-
39-
# TypeScript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# Yarn Integrity file
55-
.yarn-integrity
56-
57-
# dotenv environment variables file
58-
.env
59-
60-
# next.js build output
61-
.next
1+
node_modules
2+
tmp
3+
*.log

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
module.exports = {
4+
singleQuote: true,
5+
trailingComma: 'es5',
6+
printWidth: 100,
7+
};

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
language: node_js
3+
node_js:
4+
- "8"
5+
6+
sudo: false
7+
dist: trusty
8+
9+
cache:
10+
yarn: true
11+
12+
before_install:
13+
- curl -o- -L https://yarnpkg.com/install.sh | bash
14+
- export PATH=$HOME/.yarn/bin:$PATH
15+
16+
install:
17+
- yarn install
18+
19+
script:
20+
- yarn lint:js
21+
- yarn test
22+
- yarn test:integration

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# ember-no-implicit-this-codemod
2-
Template codemod for refactoring from `{{foo}}` to `{{this.foo}}`
2+
3+
4+
A collection of codemod's for ember-no-implicit-this-codemod.
5+
6+
## Usage
7+
8+
To run a specific codemod from this project, you would run the following:
9+
10+
```
11+
npx ember-no-implicit-this-codemod <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
12+
13+
# or
14+
15+
yarn global add ember-no-implicit-this-codemod
16+
ember-no-implicit-this-codemod <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
17+
```
18+
19+
## Transforms
20+
21+
<!--TRANSFORMS_START-->
22+
<!--TRANSFORMS_END-->
23+
24+
## Contributing
25+
26+
### Installation
27+
28+
* clone the repo
29+
* change into the repo directory
30+
* `yarn`
31+
32+
### Running tests
33+
34+
* `yarn test`
35+
36+
### Update Documentation
37+
38+
* `yarn update-docs`

bin/cli.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const transformName = process.argv[2];
5+
const args = process.argv.slice(3);
6+
7+
console.log(transformName, args);
8+
9+
require('codemod-cli').runTransform(__dirname, transformName, args);

bin/telemetry.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const gatherTelemetry = require('../lib/gather-telemetry');
5+
6+
gatherTelemetry(process.argv[2]);

lib/cache.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const Cache = require('sync-disk-cache');
2+
const getRepoInfo = require('git-repo-info');
3+
4+
const gitInfo = getRepoInfo();
5+
const cache = new Cache(`no-implicit-this-codemod-${gitInfo.sha}-${process.cwd()}`);
6+
7+
module.exports = cache;

0 commit comments

Comments
 (0)