mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Merge pull request #2864 from lholmquist/jshint_separate
Move jshint logic out of Gruntfile.js and into .jshintrc files
This commit is contained in:
commit
5735aa063c
26
.jshintrc
Normal file
26
.jshintrc
Normal 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
|
||||
}
|
62
Gruntfile.js
62
Gruntfile.js
@ -129,30 +129,7 @@ var path = require('path'),
|
||||
// Linting rules for server side or shared javascript code
|
||||
server: {
|
||||
options: {
|
||||
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
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: {
|
||||
src: [
|
||||
@ -168,40 +145,7 @@ var path = require('path'),
|
||||
// Linting rules for client side javascript code
|
||||
client: {
|
||||
options: {
|
||||
predef: {
|
||||
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
|
||||
jshintrc: 'core/client/.jshintrc'
|
||||
},
|
||||
files: {
|
||||
src: [
|
||||
@ -948,4 +892,4 @@ var path = require('path'),
|
||||
};
|
||||
|
||||
// Export the configuration
|
||||
module.exports = configureGrunt;
|
||||
module.exports = configureGrunt;
|
||||
|
32
core/client/.jshintrc
Normal file
32
core/client/.jshintrc
Normal 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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user