0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Move jshint logic out of Gruntfile.js and into .jshintrc files

This commit is contained in:
Lucas Holmquist 2014-06-02 10:55:49 -04:00
parent beb078b52c
commit a0ba5cb1b1
3 changed files with 61 additions and 59 deletions

26
.jshintrc Normal file
View file

@ -0,0 +1,26 @@
{
"node": true,
"browser": false,
"nomen": false,
"strict": false,
"sub": true,
"eqeqeq": true,
"laxbreak": true,
"bitwise": true,
"curly": true,
"forin": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"plusplus": true,
"regexp": true,
"undef": true,
"unused": true,
"trailing": true,
"indent": 4,
"onevar": true,
"white": true
}

View file

@ -129,30 +129,7 @@ var path = require('path'),
// Linting rules for server side or shared javascript code // Linting rules for server side or shared javascript code
server: { server: {
options: { options: {
node: true, jshintrc: '.jshintrc'
browser: false,
nomen: false,
strict: false,
sub: true,
eqeqeq: true,
laxbreak: true,
bitwise: true,
curly: true,
forin: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
noempty: true,
nonew: true,
plusplus: true,
regexp: true,
undef: true,
unused: true,
trailing: true,
indent: 4,
onevar: true,
white: true
}, },
files: { files: {
src: [ src: [
@ -168,40 +145,7 @@ var path = require('path'),
// Linting rules for client side javascript code // Linting rules for client side javascript code
client: { client: {
options: { options: {
predef: { jshintrc: 'core/client/.jshintrc'
document: true,
window: true,
location: true,
setTimeout: true,
Ember: true,
Em: true,
DS: true,
$: true,
validator: true,
ic: true
},
node: false,
browser: true,
nomen: false,
bitwise: true,
curly: true,
eqeqeq: true,
forin: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
noempty: true,
nonew: true,
plusplus: true,
regexp: true,
undef: true,
unused: true,
trailing: true,
indent: 4,
esnext: true,
onevar: true,
white: true
}, },
files: { files: {
src: [ src: [
@ -948,4 +892,4 @@ var path = require('path'),
}; };
// Export the configuration // Export the configuration
module.exports = configureGrunt; module.exports = configureGrunt;

32
core/client/.jshintrc Normal file
View file

@ -0,0 +1,32 @@
{
"node": false,
"browser": true,
"nomen": false,
"bitwise": true,
"curly": true,
"eqeqeq": true,
"forin": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"plusplus": true,
"regexp": true,
"undef": true,
"unused": true,
"trailing": true,
"indent": 4,
"esnext": true,
"onevar": true,
"white": true,
"globals": {
"Ember": true,
"Em": true,
"DS": true,
"$": true,
"validator": true,
"ic": true
}
}