Permalink
Browse files

Switches linting to eslint (#451)

  • Loading branch information...
realityking authored and FagnerMartinsBrack committed Jul 1, 2018
1 parent cab6678 commit 69f802be223209e0ea283b23cba05b1cd0fbc551
Showing with 73 additions and 81 deletions.
  1. 0 .jshintignore → .eslintignore
  2. +34 −0 .eslintrc
  3. +0 −14 .jshintrc
  4. +3 −27 Gruntfile.js
  5. +2 −2 bower.json
  6. +1 −2 package.json
  7. +10 −0 src/.eslintrc
  8. +0 −13 src/.jshintrc
  9. +17 −0 test/.eslintrc
  10. +0 −18 test/.jshintrc
  11. +1 −1 test/amd-config.js
  12. +1 −1 test/node.js
  13. +4 −3 test/tests.js
File renamed without changes.
View
@@ -0,0 +1,34 @@
{
"env": {
"commonjs": true
},
"globals": {
"Cookies": true
},
"rules": {
"curly": "error",
"eqeqeq": "error",
"no-unused-expressions": "error",
"new-cap": "error",
"no-caller": "error",
"no-irregular-whitespace": "error",
"no-undef": "error",
"no-unused-vars": "error",
"comma-style": ["error", "last"],
"eol-last": "error",
"semi": ["error", "always"],
"keyword-spacing": ["error", {}],
"spaced-comment": ["error", "always", {"exceptions": ["!"]}],
"space-before-blocks": ["error", "always"],
"key-spacing": ["error", {"afterColon": true}],
"indent-legacy": ["error", "tab", {"SwitchCase": 1}],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"array-bracket-spacing": ["error", "never", {}],
"space-in-parens": ["error", "never"],
"no-trailing-spaces": "error",
"no-array-constructor": "error",
"no-new-object": "error",
"no-new-wrappers": "error"
}
}
View

This file was deleted.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
/*jshint node:true */
/* eslint-env node */
'use strict';
module.exports = function (grunt) {
@@ -40,31 +40,7 @@ module.exports = function (grunt) {
nodeunit: {
all: 'test/node.js'
},
jshint: {
options: {
jshintrc: true
},
grunt: 'Gruntfile.js',
source: 'src/**/*.js',
tests: ['test/**/*.js', '!test/polyfill.js']
},
jscs: {
options: {
requireCommaBeforeLineBreak: true,
requireLineFeedAtFileEnd: true,
requireSemicolons: true,
requireSpaceBeforeKeywords: ['else', 'while', 'catch'],
requireSpaceAfterKeywords: true,
requireSpaceAfterLineComment: true,
requireSpaceBeforeBlockStatements: true,
requireSpaceBeforeObjectValues: true,
validateIndentation: '\t',
validateLineBreaks: 'LF',
validateQuoteMarks: true,
disallowSpacesInsideArrayBrackets: 'all',
disallowSpacesInsideParentheses: true,
disallowTrailingWhitespace: true
},
eslint: {
grunt: 'Gruntfile.js',
source: 'src/**/*.js',
tests: ['test/**/*.js', '!test/polyfill.js']
@@ -213,7 +189,7 @@ module.exports = function (grunt) {
}
grunt.registerTask('saucelabs', ['connect:build-sauce', 'saucelabs-qunit']);
grunt.registerTask('test', ['uglify', 'jshint', 'jscs', 'connect:build-qunit', 'qunit', 'nodeunit']);
grunt.registerTask('test', ['uglify', 'eslint', 'connect:build-qunit', 'qunit', 'nodeunit']);
grunt.registerTask('dev', ['test', 'compare_size']);
grunt.registerTask('ci', ['test', 'saucelabs']);
View
@@ -10,8 +10,8 @@
"Gruntfile.js",
"package.json",
".gitignore",
".jshintignore",
".jshintrc",
".eslintintignore",
".eslintrc",
".tm_properties",
".travis.yml"
]
View
@@ -35,12 +35,11 @@
"grunt": "1.0.2",
"grunt-compare-size": "0.4.2",
"grunt-contrib-connect": "1.0.2",
"grunt-contrib-jshint": "1.1.0",
"grunt-contrib-nodeunit": "2.0.0",
"grunt-contrib-qunit": "2.0.0",
"grunt-contrib-uglify": "2.3.0",
"grunt-contrib-watch": "1.1.0",
"grunt-jscs": "3.0.1",
"grunt-eslint": "21.0.0",
"grunt-saucelabs": "9.0.0",
"gzip-js": "0.3.2",
"qunitjs": "1.23.1",
View
@@ -0,0 +1,10 @@
{
"extends": "../.eslintrc",
"env": {
"browser": true,
"amd": true
},
"rules": {
"camelcase": "error"
}
}
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,17 @@
{
"extends": "../.eslintrc",
"env": {
"browser": true,
"qunit": true
},
"globals": {
"require": true,
"unescape": true,
"lifecycle": true,
"using": true,
"quoted": true,
"addEvent": true,
"loadFileSync": true
},
"rules": {}
}
View

This file was deleted.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
/*jshint unused:false */
/* eslint-disable no-unused-vars */
var require = {
paths: {
View
@@ -1,4 +1,4 @@
/*jshint node:true */
/* eslint-env node */
exports.node = {
should_load_js_cookie: function (test) {
test.expect(1);
View
@@ -1,6 +1,6 @@
'use strict';
/*global lifecycle: true*/
/* global lifecycle: true */
QUnit.module('read', lifecycle);
@@ -149,6 +149,7 @@ QUnit.test('String primitive', function (assert) {
});
QUnit.test('String object', function (assert) {
/* eslint-disable no-new-wrappers */
assert.expect(1);
Cookies.set('c', new String('v'));
assert.strictEqual(Cookies.get('c'), 'v', 'should write value');
@@ -421,7 +422,7 @@ QUnit.test('Array Literal', function (assert) {
});
QUnit.test('Array Constructor', function (assert) {
/*jshint -W009 */
/* eslint-disable no-array-constructor */
assert.expect(2);
var value = new Array();
value[0] = 'v';
@@ -438,7 +439,7 @@ QUnit.test('Object Literal', function (assert) {
});
QUnit.test('Object Constructor', function (assert) {
/*jshint -W010 */
/* eslint-disable no-new-object */
assert.expect(2);
var value = new Object();
value.k = 'v';

0 comments on commit 69f802b

Please sign in to comment.