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

Add Linting to CI #920

Merged
merged 5 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ on:
- cron: '0 6 * * 0'

jobs:
lint-all-packages:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter "./packages/*" lint

test-all-packages:
name: Ember Tests
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ node_modules/
/npm-debug.log*
/testem.log
yarn-error.log
.eslintcache

# ember-try
.node_modules.ember-try/
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-dupe-keys, prettier/prettier */
'use strict';

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
// When using `ember serve` when fastboot addon is installed the application
// output will already be rendered to the DOM when the actual JavaScript
// loads. Ember does not automatically clear its `rootElement` so this
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/addon/locations/none.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/no-classic-classes, ember/no-get, ember/require-computed-property-dependencies, prettier/prettier */
import { computed, get } from '@ember/object';
import { bool, readOnly } from '@ember/object/computed';
import { inject as service } from '@ember/service';
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/addon/services/fastboot.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/no-classic-classes, ember/no-get, ember/require-computed-property-dependencies, ember/require-return-from-computed, prettier/prettier */
/* global FastBoot */
import { getOwner } from '@ember/application';
import { computed, get } from '@ember/object';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
/* eslint-env node */
const recast = require('recast');
const { readFileSync, writeFileSync } = require('fs');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-redeclare, no-unused-vars, prettier/prettier */
/*globals Ember, URL*/
export default {
name: "dom-helper-patches",
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/fastboot/initializers/ajax.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
/* globals najax */
import Ember from 'ember';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import Ember from 'ember';

/**
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-prototype-builtins, prettier/prettier */
/* eslint-env node */
'use strict';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, prettier/prettier */
/* eslint-env node */
'use strict';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
'use strict';

const path = require('path');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
'use strict'

// Added as app boot code to app.js that allows booting of the application
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
'use strict';

// Expose an factory for the creating the `Application` object
Expand Down
2 changes: 2 additions & 0 deletions packages/ember-cli-fastboot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"glob": "^7.1.3",
"lint-to-the-future": "^2.0.0",
"lint-to-the-future-eslint": "^2.0.1",
"loader.js": "^4.7.0",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/test/fastboot-config-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const expect = require('chai').use(require('chai-string')).expect;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const expect = require('chai').expect;
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/test/fastboot-location-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, prettier/prettier */
'use strict';

const expect = require('chai').expect;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const browsers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-redeclare, prettier/prettier */
/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';
import config from './config/environment';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
/* jshint node: true */
'use strict';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, no-unused-vars, prettier/prettier */
module.exports = function(environment) {
return {
sandboxGlobals: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const browsers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
module.exports = function(defaults) {
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp(defaults, {});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

let Router = Ember.Router;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports */
import Ember from 'ember';

export default Ember.Route.extend({});
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, prettier/prettier */
'use strict';

module.exports = function(environment) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const browsers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';
import config from './config/environment';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports */
import Ember from 'ember';

export default Ember.Route.extend({});
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, prettier/prettier */
'use strict';

module.exports = function(environment) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const browsers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from "ember";

export default Ember.Controller.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-cookies',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-headers',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-query-params',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-boy',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-host',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-method',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-path',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
export default {
name: 'test-protocol',
initialize(applicationInstance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, prettier/prettier */
import Ember from 'ember';
import config from './config/environment';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from "ember";

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable ember/new-module-imports, ember/no-get, prettier/prettier */
import Ember from 'ember';

export default Ember.Route.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
/* jshint node: true */
'use strict';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const browsers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable node/no-extraneous-require, prettier/prettier */
var bodyParser = require('body-parser');
var FastBootExpressMiddleware = require('fastboot-express-middleware');
var FastBoot = require('fastboot');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, prettier/prettier */
'use strict';

module.exports = function(environment) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const browsers = [
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/test/new-package-json-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef, prettier/prettier */
/* eslint-env node */
'use strict';

Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/test/package-json-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const chai = require('chai');
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/test/request-details-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
'use strict';

const chai = require('chai');
Expand Down
Loading