From: Iskren Chernev Date: Tue, 28 Apr 2020 17:53:27 +0000 (+0300) Subject: Remove jshint/jscs remaining references X-Git-Tag: 2.25.0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b739324cfe8026d1314f130924a2c459e8d469a9;p=thirdparty%2Fmoment.git Remove jshint/jscs remaining references --- diff --git a/.jscs.json b/.jscs.json deleted file mode 100644 index 081308580..000000000 --- a/.jscs.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "requireCurlyBraces": [ - "if", - "else", - "for", - "while", - "do", - "try", - "catch" - ], - "requireSpaceAfterKeywords": [ - "if", - "else", - "for", - "while", - "do", - "switch", - "return", - "try", - "catch" - ], - "requireSpaceBeforeBlockStatements": true, - "requireParenthesesAroundIIFE": true, - "requireSpacesInConditionalExpression": true, - "requireSpacesInAnonymousFunctionExpression": { - "beforeOpeningRoundBrace": true, - "beforeOpeningCurlyBrace": true - }, - "requireSpacesInNamedFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "disallowSpacesInNamedFunctionExpression": { - "beforeOpeningRoundBrace": true - }, - "requireBlocksOnNewline": true, - "disallowPaddingNewlinesInBlocks": true, - "disallowEmptyBlocks": true, - "disallowSpacesInsideObjectBrackets": true, - "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideParentheses": true, - "requireCommaBeforeLineBreak": true, - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforeBinaryOperators": [ - "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", - "&=", "|=", "^=", - - "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", - "|", "^", "&&", "||", "===", "==", ">=", - "<=", "<", ">", "!=", "!==" - ], - "requireSpaceAfterBinaryOperators": true, - "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", - "disallowKeywords": ["with"], - "disallowMultipleLineStrings": true, - "validateIndentation": 4, - "disallowTrailingWhitespace": true, - "disallowTrailingComma": true, - "requireLineFeedAtFileEnd": true, - "requireCapitalizedConstructors": true, - "validateQuoteMarks": { - "mark": "'", - "escape": true - } -} diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 220eb214c..000000000 --- a/.jshintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "node" : true, - "browser" : true, - "boss" : false, - "curly" : true, - "debug" : false, - "devel" : false, - "eqeqeq" : true, - "eqnull" : true, - "esnext" : true, - "evil" : false, - "forin" : false, - "immed" : false, - "laxbreak" : false, - "newcap" : true, - "noarg" : true, - "noempty" : false, - "nonew" : false, - "onevar" : true, - "plusplus" : false, - "regexp" : false, - "undef" : true, - "sub" : true, - "strict" : false, - "white" : true, - "es3" : false, - "camelcase" : true, - "globals": { - "define": false - } -} diff --git a/Gruntfile.js b/Gruntfile.js index 63aea1e05..b514eb36c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -111,44 +111,20 @@ module.exports = function (grunt) { sourceMap: true, mangle: true, compress: { - dead_code: false, // jshint ignore:line + dead_code: false, }, output: { - ascii_only: true, // jshint ignore:line + ascii_only: true, }, report: 'min', preserveComments: /^!|@preserve|@license|@cc_on/i, }, }, - // jshint: { - // all: [ - // 'Gruntfile.js', - // 'tasks/**.js', - // 'src/**/*.js' - // ], - // options: { - // jshintrc: true - // } - // }, - // jscs: { - // all: [ - // 'Gruntfile.js', - // 'tasks/**.js', - // 'src/**/*.js' - // ], - // options: { - // config: '.jscs.json' - // } - // }, watch: { test: { files: ['src/**/*.js'], tasks: ['test'], }, - // jshint : { - // files : '<%= jshint.all %>', - // tasks: ['jshint'] - // } }, benchmark: { compare: { src: ['benchmarks/compare.js'] }, diff --git a/src/test/locale/si.js b/src/test/locale/si.js index 0859a09e4..c9074690b 100644 --- a/src/test/locale/si.js +++ b/src/test/locale/si.js @@ -3,7 +3,6 @@ import { localeModule } from '../qunit-locale'; import moment from '../../moment'; localeModule('si'); -/*jshint -W100*/ test('parse', function (assert) { var tests = 'ජනවාරි ජන_පෙබරවාරි පෙබ_මාර්තු මාර්_අප්‍රේල් අප්_මැයි මැයි_ජූනි ජූනි_ජූලි ජූලි_අගෝස්තු අගෝ_සැප්තැම්බර් සැප්_ඔක්තෝබර් ඔක්_නොවැම්බර් නොවැ_දෙසැම්බර් දෙසැ'.split( '_' diff --git a/src/test/moment/format.js b/src/test/moment/format.js index ea8ee5f32..1ea1e9f0e 100644 --- a/src/test/moment/format.js +++ b/src/test/moment/format.js @@ -377,7 +377,6 @@ test('toISOString without UTC conversion', function (assert) { // See https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects test('inspect', function (assert) { function roundtrip(m) { - /*jshint evil:true */ return new Function('moment', 'return ' + m.inspect())(moment); } function testInspect(date, string) { diff --git a/src/test/moment/is_moment.js b/src/test/moment/is_moment.js index 8ad58636e..77661bab9 100644 --- a/src/test/moment/is_moment.js +++ b/src/test/moment/is_moment.js @@ -40,7 +40,7 @@ test('is moment object', function (assert) { test('is moment with hacked hasOwnProperty', function (assert) { var obj = {}; - // HACK to suppress jshint warning about bad property name + // HACK to suppress linter warning about bad property name obj['hasOwnMoney'.replace('Money', 'Property')] = function () { return true; }; diff --git a/src/test/moment/is_number.js b/src/test/moment/is_number.js index dc7726629..863d0b1a1 100644 --- a/src/test/moment/is_number.js +++ b/src/test/moment/is_number.js @@ -13,7 +13,7 @@ test('isNumber recognizes numbers', function (assert) { assert.ok(isNumber(Math.LN2), 'natural log of two'); assert.ok(isNumber(Math.PI), 'delicious number'); assert.ok(isNumber(5e10), 'scientifically notated number'); - assert.ok(isNumber(new Number(1)), 'number primitive wrapped in an object'); // jshint ignore:line + assert.ok(isNumber(new Number(1)), 'number primitive wrapped in an object'); }); test('isNumber rejects non-numbers', function (assert) {