Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade typescript/eslint related dependencies, drop node8 and add node16 CI support #3628

Merged
merged 10 commits into from
Jul 3, 2021
71 changes: 0 additions & 71 deletions .eslintrc.json

This file was deleted.

5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "8"
- nodejs_version: "10"
- nodejs_version: "12"
- nodejs_version: "14"
- nodejs_version: "16"

# Install scripts. (runs after repo cloning)
install:
# https://help.appveyor.com/discussions/questions/11941-node-version-not-available-after-specifying-nodejs_version
- ps: Install-Product node $env:nodejs_version

# node 0.10 & 0.12 have race condition issues when running custom install scripts
# this can cause phantomjs-prebuilt install script to fail with the error:
# <Cannot find module 'boom'>
Expand Down
3 changes: 2 additions & 1 deletion packages/less/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Gruntfile.js
dist/*
tmp/*
lib/*
test/browser/less.min.js
test/browser/less.min.js
node_modules
72 changes: 70 additions & 2 deletions packages/less/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
{
"extends": "../../.eslintrc.json"
}
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"env": {
"browser": true,
"node": true
},
"globals": {},
"rules": {
"no-eval": 2,
"no-use-before-define": [
2,
{
"functions": false
}
],
"no-undef": 0,
"no-unused-vars": 1,
"no-caller": 2,
"no-eq-null": 1,
"guard-for-in": 2,
"no-implicit-coercion": [
2,
{
"boolean": false,
"string": true,
"number": true
}
],
"no-with": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": 2,
"dot-location": [2, "property"],
"operator-linebreak": [0, "after"],
"keyword-spacing": [2, {}],
"space-unary-ops": [
2,
{
"words": false,
"nonwords": false
}
],
"no-spaced-func": 2,
"space-before-function-paren": [
1,
{
"anonymous": "ignore",
"named": "never"
}
],
"comma-dangle": [2, "never"],
"no-trailing-spaces": 0,
"max-len": [2, 160],
"comma-style": [2, "last"],
"curly": [2, "all"],
"space-infix-ops": 2,
"spaced-comment": 1,
"space-before-blocks": [2, "always"],
"indent": [
2,
4,
{
"SwitchCase": 1
}
]
}
}
17 changes: 6 additions & 11 deletions packages/less/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = function(grunt) {
// Report the elapsed execution time of tasks.
require("time-grunt")(grunt);

var COMPRESS_FOR_TESTS = false;
var git = require("git-rev");

// Sauce Labs browser
Expand Down Expand Up @@ -184,17 +183,11 @@ module.exports = function(grunt) {
// Make the SauceLabs jobs
["all"].concat(browserTests).map(makeJob);

var semver = require('semver');
var path = require('path');

// Handle async / await in Rollup build for tests
// Remove this when Node 6 is no longer supported for the build/test process
const nodeVersion = semver.major(process.versions.node);
const tsNodeRuntime = path.resolve(path.join('node_modules', '.bin', 'ts-node'));
let scriptRuntime = 'node';
if (nodeVersion < 8) {
scriptRuntime = tsNodeRuntime;
}
const crossEnv = path.resolve(path.join('node_modules', '.bin', 'cross-env'));

// Project configuration.
grunt.initConfig({
Expand All @@ -209,7 +202,7 @@ module.exports = function(grunt) {
build: {
command: [
/** Browser runtime */
scriptRuntime + " build/rollup.js --dist",
"node build/rollup.js --dist",
/** Copy to repo root */
"npm run copy:root",
/** Node.js runtime */
Expand All @@ -219,17 +212,19 @@ module.exports = function(grunt) {
testbuild: {
command: [
"npm run build",
scriptRuntime + " build/rollup.js --browser --out=./tmp/browser/less.min.js"
"node build/rollup.js --browser --out=./tmp/browser/less.min.js"
].join(" && ")
},
testcjs: {
command: "npm run build"
},
testbrowser: {
command: scriptRuntime + " build/rollup.js --browser --out=./tmp/browser/less.min.js"
command: "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
},
test: {
command: [
// https://github.com/TypeStrong/ts-node/issues/693#issuecomment-848907036
crossEnv + " TS_NODE_SCOPE=true",
tsNodeRuntime + " test/test-es6.ts",
"node test/index.js"
].join(' && ')
Expand Down
Loading