Skip to content

Commit d46a7d4

Browse files
author
Zeno Rocha
committed
Fix mixed tabs and spaces and automate the process to discover it
1 parent 0c2d6a7 commit d46a7d4

File tree

4 files changed

+38
-8
lines changed

4 files changed

+38
-8
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.DS_Store
1+
node_modules

Gruntfile.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
lintspaces: {
4+
all: {
5+
src: ['*'],
6+
options: {
7+
newline: false,
8+
trailingspaces: true,
9+
indentation: 'tabs',
10+
spaces: 4
11+
}
12+
}
13+
}
14+
});
15+
16+
grunt.loadNpmTasks('grunt-lintspaces');
17+
18+
grunt.registerTask('default', ['lintspaces']);
19+
};

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ ${1:myArray}.forEach(function (${2:elem}) {
171171
172172
```javascript
173173
for (var ${1:prop} in ${2:obj}) {
174-
if (${2:obj}.hasOwnProperty(${1:prop})) {
175-
${0:// body...}
176-
}
174+
if (${2:obj}.hasOwnProperty(${1:prop})) {
175+
${0:// body...}
176+
}
177177
}
178178
```
179179
@@ -278,22 +278,22 @@ require('${1:module}');
278278
279279
```javascript
280280
describe('${1:description}', function () {
281-
${0:// body...}
281+
${0:// body...}
282282
});
283283
```
284284
### [ita] it asynchronous
285285
286286
```javascript
287287
it('${1:description}', function (done) {
288-
${0:// body...}
288+
${0:// body...}
289289
});
290290
```
291291
292292
### [its] it synchronous
293293
294294
```javascript
295295
it('${1:description}', function () {
296-
${0:// body...}
296+
${0:// body...}
297297
});
298298
```
299299
@@ -319,4 +319,4 @@ Check [Release](https://github.com/zenorocha/sublime-snippets-js/releases) list.
319319
320320
## License
321321
322-
[MIT License](http://zenorocha.mit-license.org/) © Zeno Rocha
322+
[MIT License](http://zenorocha.mit-license.org/) © Zeno Rocha

package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "sublime-snippets-js",
3+
"repository": {
4+
"type": "git",
5+
"url": "https://github.com/zenorocha/sublime-snippets-js.git"
6+
},
7+
"devDependencies": {
8+
"grunt": "0.4.1",
9+
"grunt-lintspaces": "0.2.203"
10+
}
11+
}

0 commit comments

Comments
 (0)