Skip to content

Commit

Permalink
Merge pull request #32 from the-t-in-rtf/GH-31
Browse files Browse the repository at this point in the history
GH-31: Migrate to `fluid-lint-all` and update all dependencies (resolves #31).
  • Loading branch information
the-t-in-rtf authored Jan 19, 2021
2 parents 79c457f + 1e830dd commit 1e68674
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 44 deletions.
20 changes: 20 additions & 0 deletions .fluidlintallrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"sources": {
"md": [ "./*.md","./docs/*.md"],
"js": ["./src/**/*.js", "./tests/**/*.js", "./*.js"],
"json": ["./src/**/*.json", "./tests/**/*.json", "./*.json"],
"json5": ["./src/**/*.json5", "./tests/**/*.json5", "./*.json5"],
"other": ["./.*"]
},
"eslint": {
"md": {
"options": {
"overrideConfig": {
"rules": {
"no-redeclare": 0
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: npm install

- name: Lint Code
run: $(npm bin)/grunt lint
run: npm run lint

- name: Node Tests
run: xvfb-run --auto-servernum npm test
Expand Down
18 changes: 0 additions & 18 deletions Gruntfile.js

This file was deleted.

29 changes: 13 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
"description": "Support validation of JSON within the Fluid ecosystem.",
"main": "index.js",
"scripts": {
"pretest": "node node_modules/rimraf/bin.js coverage reports && node node_modules/mkdirp coverage reports",
"lint": "fluid-lint-all",
"pretest": "npx rimraf coverage reports && npx mkdirp coverage reports",
"test": "npm run test:node && npm run test:browser",
"test:node": "node node_modules/nyc/bin/nyc.js --reporter none node tests/all-node-tests.js",
"test:browser": "node node_modules/testem/testem.js ci --file tests/testem.js",
"posttest": "node node_modules/nyc/bin/nyc.js report"
"test:node": "nyc --reporter none node tests/all-node-tests.js",
"test:browser": "testem ci --file tests/testem.js",
"posttest": "nyc report"
},
"repository": {
"type": "git",
Expand All @@ -18,27 +19,23 @@
"license": "BSD-3-Clause",
"dependencies": {
"ajv": "6.12.3",
"fluid-binder": "1.1.1",
"fluid-express": "1.0.16",
"fluid-handlebars": "2.1.3",
"infusion": "3.0.0-dev.20200525T143422Z.f7f6aab.FLUID-6148",
"fluid-binder": "1.1.2",
"fluid-express": "1.0.17",
"fluid-handlebars": "2.1.4",
"infusion": "3.0.0-dev.20210114T215306Z.2b1fe9609.FLUID-6580",
"kettle": "1.15.0"
},
"devDependencies": {
"eslint": "7.4.0",
"eslint-config-fluid": "1.4.0",
"eslint-plugin-markdown": "1.0.2",
"eslint": "7.18.0",
"eslint-config-fluid": "2.0.0",
"foundation-sites": "6.6.3",
"fluid-grunt-lint-all": "1.0.8",
"fluid-testem": "2.1.13",
"grunt": "1.2.1",
"fluid-lint-all": "1.0.0",
"fluid-testem": "2.1.14",
"handlebars": "4.7.6",
"markdown-it": "11.0.0",
"mkdirp": "1.0.4",
"node-jqunit": "1.1.8",
"nyc": "15.1.0",
"request": "2.88.2",
"rimraf": "3.0.2",
"testem": "3.2.0"
}
}
1 change: 1 addition & 0 deletions src/js/common/fss-metaschema.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-env browser */
/* globals require */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || require("infusion");
(function (fluid) {
"use strict";
Expand Down
1 change: 1 addition & 0 deletions src/js/common/orderedStringify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* globals require */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || require("infusion");
(function (fluid) {
// TODO: pull this up into Infusion if we need to use this type of object hashing more broadly.
Expand Down
1 change: 1 addition & 0 deletions src/js/common/schemaValidatedComponent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* globals require */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || require("infusion");
(function (fluid) {
"use strict";
Expand Down
1 change: 1 addition & 0 deletions src/js/common/schemaValidatedModelComponent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* globals require */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || require("infusion");
(function (fluid) {
"use strict";
Expand Down
3 changes: 2 additions & 1 deletion src/js/common/validator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-env browser */
/* globals require, Ajv */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || require("infusion");
(function (fluid, Ajv) {
"use strict";
Expand Down Expand Up @@ -253,7 +254,7 @@ var fluid = fluid || require("infusion");
* @typedef schemaValidationResult
* @property {Boolean} isError - `true` if there is a validation, `false` (or missing) otherwise.
* @property {String} message - A summary of the result.
* @property {Array<ajvError>} - An array of validation errors returned by AJV when validating the schema.
* @property {Array<ajvError>} errors - An array of validation errors returned by AJV when validating the schema.
*
*/

Expand Down
2 changes: 2 additions & 0 deletions tests/browser-fixtures/js/errorBinder-tests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable no-redeclare */
/* global fluid, jQuery, jqUnit */
var fluid = fluid || {};
/* eslint-enable no-redeclare */
(function (fluid, $, jqUnit) {
"use strict";
fluid.setLogging(true);
Expand Down
1 change: 1 addition & 0 deletions tests/js/common/lib/check-potentia-grades.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* globals require */
/* eslint-env browser */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || {};

(function (fluid) {
Expand Down
4 changes: 3 additions & 1 deletion tests/js/common/metaschema-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
to validate FSS schemas.
*/
/* globals Ajv, jqUnit, require */
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals Ajv, jqUnit, require */
var fluid = fluid || {};
var Ajv = Ajv || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, Ajv, jqUnit) {
"use strict";
Expand Down
4 changes: 3 additions & 1 deletion tests/js/common/orderedStringify-tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* globals jqUnit, require */
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals jqUnit, require */
var fluid = fluid || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, jqUnit) {
"use strict";
Expand Down
4 changes: 3 additions & 1 deletion tests/js/common/schema-holder-tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals require */
var fluid = fluid || {};
var fluid = fluid || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, jqUnit) {
"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
*/
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals require */
var fluid = fluid || {};
var Ajv = Ajv || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, Ajv, jqUnit) {
"use strict";
Expand Down
1 change: 1 addition & 0 deletions tests/js/common/schema-validated-component-tests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-env browser */
/* globals require */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || {};
var Ajv = Ajv || {};
var jqUnit = jqUnit || {};
Expand Down
4 changes: 3 additions & 1 deletion tests/js/common/schema-validated-modelComponent-tests.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* globals Ajv, jqUnit, require */
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals Ajv, jqUnit, require */
var fluid = fluid || {};
var Ajv = Ajv || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, Ajv, jqUnit) {
"use strict";
Expand Down
4 changes: 3 additions & 1 deletion tests/js/common/validator-global-component-tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* globals jqUnit, require */
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals jqUnit, require */
var fluid = fluid || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, jqUnit) {
"use strict";
Expand Down
4 changes: 3 additions & 1 deletion tests/js/common/validator-static-function-testDefs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* globals jqUnit, require */
/* eslint-env browser */
/* eslint-disable no-redeclare */
/* globals jqUnit, require */
var fluid = fluid || {};
var jqUnit = jqUnit || {};
/* eslint-enable no-redeclare */

(function (fluid, jqUnit) {
"use strict";
Expand Down
1 change: 1 addition & 0 deletions tests/js/common/validator-tests-ajv-errors-testDefs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* globals require */
/* eslint-env browser */
/* eslint-disable-next-line no-redeclare */
var fluid = fluid || {};

(function (fluid) {
Expand Down
2 changes: 0 additions & 2 deletions tests/templates/layouts/main.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@
{{{body}}}
</body>
</html>


0 comments on commit 1e68674

Please sign in to comment.