Skip to content

Commit

Permalink
Merge pull request #1163 from NYCPlanning/develop
Browse files Browse the repository at this point in the history
Merge node 18/Ember 4.12 upgrades and user interview sign up banner to master
  • Loading branch information
TylerMatteo authored Dec 12, 2023
2 parents 1d2a2b7 + aba700a commit 6d32bba
Show file tree
Hide file tree
Showing 283 changed files with 7,329 additions and 8,864 deletions.
8 changes: 7 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
83 changes: 49 additions & 34 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
parser: '@babel/eslint-parser',
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: [
'ember'
],
plugins: ['ember', 'decorator-position'],
extends: [
'eslint:recommended',
'airbnb-base',
'plugin:ember-best-practices/recommended',
'plugin:ember/recommended',
'plugin:decorator-position/ember',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
globals:{
'$': true,
globals: {
$: true,
d3: true,
},
rules: {
Expand All @@ -34,40 +35,54 @@ module.exports = {
'space-before-function-paren': 0,
'prefer-arrow-callback': 0,
'no-underscore-dangle': 0,
'camelcase': 0,
camelcase: 0,
'class-methods-use-this': 0,
'max-len': 0,
'no-param-reassign': 0,
'ember/avoid-leaking-state-in-ember-objects': 0,
'ember-best-practices/require-dependent-keys': 0,
'no-undef': 0,
'ember/no-classic-components': 'warn',
'ember/no-classic-classes': 'warn',
'ember/no-get': 'warn',
'ember/no-actions-hash': 'warn',
'ember/require-tagless-components': 'warn',
'ember/no-observers': 'warn',
'ember/classic-decorator-no-classic-methods': 'warn',
'ember/classic-decorator-hooks': 'warn',
'ember/no-component-lifecycle-hooks': 'warn',
'ember/no-empty-glimmer-component-classes': 'warn',
'ember/require-computed-macros': 'warn',
'ember/no-computed-properties-in-native-classes': 'warn',
'ember/no-legacy-test-waiters': 'warn',
'ember/no-mixins': 'warn',
'ember/no-new-mixins': 'warn',
'ember/avoid-leaking-state-in-ember-objects': 'warn',
'ember/no-incorrect-calls-with-inline-anonymous-functions': 'warn',
'max-classes-per-file': 0,
'decorator-position/decorator-position': 0,
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/*/index.js',
'./server/**/*.js',
],
parserOptions: {
sourceType: 'script'
sourceType: 'script',
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
}
}
]
extends: ['plugin:n/recommended'],
},
],
};
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint

test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: yarn test
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: test
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ development.env
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try

.eslintcache
.yalc
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.1
18.16.0
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
11 changes: 8 additions & 3 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
15 changes: 13 additions & 2 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
'use strict';

module.exports = {
extends: 'recommended',
rules: {
'no-inline-styles': false,
'no-curly-component-invocation': false,
'no-action': false,
'no-yield-only': false,
'require-presentational-children': false,
'no-invalid-interactive': false,
'no-unused-block-params': false,
'no-negated-condition': false,
'link-href-attributes': false,
'no-nested-interactive': false,
'require-input-label': false,
},
};
5 changes: 2 additions & 3 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import DS from 'ember-data';
import JSONAPIAdapter from '@ember-data/adapter/json-api';

export default DS.JSONAPIAdapter.extend({
});
export default JSONAPIAdapter.extend({});
4 changes: 3 additions & 1 deletion app/adapters/bookmark.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { default } from 'ember-local-storage/adapters/adapter';
import LocalAdapter from 'ember-local-storage/adapters/adapter';

export default LocalAdapter;
7 changes: 2 additions & 5 deletions app/adapters/commercial-overlay.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildSqlUrl } from '../utils/carto';
import CartoGeojsonFeatureAdapter from './carto-geojson-feature';

const SQL = function(id) {
const SQL = function (id) {
return `SELECT * FROM (
SELECT ST_CollectionExtract(ST_Collect(the_geom),3) as the_geom,
overlay as id,
Expand All @@ -13,9 +13,6 @@ const SQL = function(id) {

export default CartoGeojsonFeatureAdapter.extend({
urlForFindRecord(id) {
return buildSqlUrl(
SQL(id),
'geojson',
);
return buildSqlUrl(SQL(id), 'geojson');
},
});
3 changes: 1 addition & 2 deletions app/adapters/layer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import ApplicationAdapter from './application';

export default ApplicationAdapter.extend({
});
export default ApplicationAdapter.extend({});
7 changes: 2 additions & 5 deletions app/adapters/lot.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const LotColumnsSQL = [
'LOWER(zonemap) AS zonemap',
];

export const cartoQueryTemplate = function(id) {
export const cartoQueryTemplate = function (id) {
return `SELECT ${LotColumnsSQL.join(',')},
/* id:${id} */
st_x(st_centroid(the_geom)) as lon, st_y(st_centroid(the_geom)) as lat,
Expand All @@ -64,9 +64,6 @@ export default CartoGeojsonFeatureAdapter.extend({
return this._super(status, headers, payload, requestData);
},
urlForFindRecord(id) {
return buildSqlUrl(
cartoQueryTemplate(id),
'geojson',
);
return buildSqlUrl(cartoQueryTemplate(id), 'geojson');
},
});
7 changes: 2 additions & 5 deletions app/adapters/special-purpose-district.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildSqlUrl } from '../utils/carto';
import CartoGeojsonFeatureAdapter from './carto-geojson-feature';

const SQL = function(id) {
const SQL = function (id) {
return `SELECT cartodb_id as id,
cartodb_id,
the_geom,
Expand All @@ -13,9 +13,6 @@ const SQL = function(id) {

export default CartoGeojsonFeatureAdapter.extend({
urlForFindRecord(id) {
return buildSqlUrl(
SQL(id),
'geojson',
);
return buildSqlUrl(SQL(id), 'geojson');
},
});
7 changes: 2 additions & 5 deletions app/adapters/special-purpose-subdistrict.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildSqlUrl } from '../utils/carto';
import CartoGeojsonFeatureAdapter from './carto-geojson-feature';

const SQL = function(id) {
const SQL = function (id) {
return `SELECT
cartodb_id as id,
cartodb_id,
Expand All @@ -15,9 +15,6 @@ const SQL = function(id) {

export default CartoGeojsonFeatureAdapter.extend({
urlForFindRecord(id) {
return buildSqlUrl(
SQL(id),
'geojson',
);
return buildSqlUrl(SQL(id), 'geojson');
},
});
7 changes: 2 additions & 5 deletions app/adapters/zoning-district.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildSqlUrl } from '../utils/carto';
import CartoGeojsonFeatureAdapter from './carto-geojson-feature';

const SQL = function(id) {
const SQL = function (id) {
return `SELECT *
FROM (
SELECT ST_CollectionExtract(ST_Collect(the_geom),3) as the_geom,
Expand All @@ -15,9 +15,6 @@ const SQL = function(id) {

export default CartoGeojsonFeatureAdapter.extend({
urlForFindRecord(id) {
return buildSqlUrl(
SQL(id),
'geojson',
);
return buildSqlUrl(SQL(id), 'geojson');
},
});
Loading

0 comments on commit 6d32bba

Please sign in to comment.