Skip to content

Commit

Permalink
Merge pull request #38 from the-t-in-rtf/GH-37
Browse files Browse the repository at this point in the history
GH-37: Migrate to fluid-lint-all (resolves #37).
  • Loading branch information
the-t-in-rtf authored Jan 19, 2021
2 parents 8dbb16f + 1003115 commit 8d4dd31
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 63 deletions.
10 changes: 10 additions & 0 deletions .fluidlintallrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"sources": {
"md": ["./src/**/*.md", "./tests/**/*.md", "./*.md", "./docs/**/*.md"]
},
"lintspaces": {
"newlines": {
"excludes": ["./node_modules/*", "./tests/templates/**/*.handlebars"]
}
}
}
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 bin)/fluid-lint-all

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

This file was deleted.

34 changes: 16 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,38 @@
"license": "BSD-3-Clause",
"repository": "https://github.com/fluid-project/fluid-handlebars",
"scripts": {
"pretest": "node node_modules/rimraf/bin.js coverage/* reports/*",
"lint": "fluid-lint-all",
"pretest": "npx rimraf coverage/* reports/*",
"test": "npm run test:node && npm run test:browser",
"test:node": "node node_modules/nyc/bin/nyc.js node tests/js/server/all-server-tests.js",
"test:node": "nyc node tests/js/server/all-server-tests.js",
"test:browser": "node node_modules/testem/testem.js ci --file tests/testem.js",
"posttest": "node node_modules/nyc/bin/nyc.js report --reporter text-summary --reporter html"
"posttest": "nyc report --reporter text-summary --reporter html"
},
"dependencies": {
"chokidar": "3.4.0",
"fluid-binder": "1.1.1",
"fluid-express": "1.0.16",
"chokidar": "3.5.0",
"fluid-binder": "1.1.2",
"fluid-express": "1.0.17",
"handlebars": "4.7.6",
"infusion": "3.0.0-dev.20200525T143422Z.f7f6aab.FLUID-6148",
"infusion": "3.0.0-dev.20210114T211758Z.d345ecd74.FLUID-6145",
"json5": "2.1.3",
"markdown-it": "11.0.0",
"md5": "2.2.1",
"markdown-it": "12.0.4",
"md5": "2.3.0",
"underscore-node": "0.1.2"
},
"devDependencies": {
"cheerio": "1.0.0-rc.3",
"eslint": "7.1.0",
"eslint-config-fluid": "1.4.0",
"eslint-plugin-markdown": "1.0.2",
"fluid-grunt-lint-all": "1.0.8",
"fluid-testem": "2.1.13",
"eslint": "7.17.0",
"eslint-config-fluid": "2.0.0",
"fluid-lint-all": "1.0.0",
"fluid-testem": "2.1.14",
"graceful-fs": "4.2.4",
"grunt": "1.1.0",
"kettle": "1.12.0",
"mkdirp": "1.0.4",
"node-jqunit": "1.1.8",
"nyc": "15.0.1",
"recursive-copy": "2.0.10",
"recursive-copy": "2.0.11",
"request": "2.88.2",
"rimraf": "3.0.2",
"testem": "3.1.0",
"testem": "3.2.0",
"tough-cookie": "4.0.0"
}
}
11 changes: 0 additions & 11 deletions src/js/client/serverResourceAware.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@
events: {
onRendererAvailable: null
},
// TODO: Remove
listeners: {
"onResourcesLoaded.logTemplates": {
funcName: "console.log",
args: ["TEMPLATES:", "@expand:JSON.stringify({that}.model.templates, null, 2)"]
},
"onResourcesLoaded.logMessages": {
funcName: "console.log",
args: ["MESSAGES:", "@expand:JSON.stringify({that}.model.messages, null, 2)"]
}
},
resources: {
messages: {
url: "/messages",
Expand Down
4 changes: 2 additions & 2 deletions src/js/common/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
See the docs for details: https://github.com/fluid-project/fluid-handlebars/blob/main/docs/renderer.md
*/
/* global fluid, Handlebars, require */
/* global require */
var fluid_3_0_0 = fluid_3_0_0 || {};
var Handlebars = Handlebars || {};
(function (fluid, Handlebars) {
Expand Down Expand Up @@ -40,7 +40,7 @@ var Handlebars = Handlebars || {};
*
* Our internal handlebars instance needs to be made aware of each of our helpers.
*
* @param {Object} that The renderer component itself.
* @param {Object} that - The renderer component itself.
*
*/
fluid.handlebars.renderer.loadPartials = function (that) {
Expand Down
1 change: 1 addition & 0 deletions src/js/server/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ fluid.defaults("fluid.handlebars.watcher", {
watchDirs: {},
// See: https://github.com/paulmillr/chokidar#api
chokidarOptions: {
useFsEvents: false, // Added to work around a crash when handling large files.
ignoreInitial: true, // We do not want to detect files when starting up, only when they change after startup.
awaitWriteFinish: false,
depth: 2 // We are typically dealing with template directories that contain at most one level of subdirectories.
Expand Down
4 changes: 0 additions & 4 deletions tests/js/server/live-reload-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"use strict";
var fluid = require("infusion");

// TODO: Confirm whether these are truly necessary.
fluid.setLogging(true);
fluid.logObjectRenderChars = 10240;

fluid.require("%fluid-handlebars");

var copy = require("recursive-copy");
Expand Down
12 changes: 3 additions & 9 deletions tests/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@ var testemComponent = fluid.testem.instrumentation({
errorJsonString: "/errorJsonString",
errorString: "/errorString"
},
// Force Firefox to run headless as a temporary fix for Firefox issues on Windows:
// https://github.com/testem/testem/issues/1377
"browserArgs": {
"Firefox": [
"--no-remote",
"--headless"
]
},
testemOptions: {
skip: "PhantomJS,Safari,IE,Headless Chrome" // "Headless Chrome" throws GPU errors at the moment, so just use Chrome.
// "Headless Chrome" throws GPU errors at the moment, so just use Chrome.
// "Firefox" is now redundant as there is a headless option.
skip: "PhantomJS,Safari,IE,Firefox,Headless Chrome"
},
components: {
express: {
Expand Down

0 comments on commit 8d4dd31

Please sign in to comment.