mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-30 23:06:18 +00:00
Update to latest @twipped/eslint-config
This commit is contained in:
parent
0ba2defbc2
commit
9fd4723c1c
@ -1 +1,4 @@
|
|||||||
/dist
|
/dist
|
||||||
|
/published
|
||||||
|
/terraform
|
||||||
|
/analytics
|
@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "twipped/node",
|
"extends": "@twipped/eslint-config/node-cjs",
|
||||||
"rules": {
|
"rules": {
|
||||||
"node/no-unpublished-require": 0,
|
"node/no-unpublished-require": 0,
|
||||||
"indent": [ 2, 2, {
|
"indent": [ 2, 2, {
|
||||||
"MemberExpression": 1
|
"MemberExpression": 1
|
||||||
} ],
|
} ]
|
||||||
"node/no-unsupported-features/es-syntax": [ "error" ],
|
|
||||||
"node/no-unsupported-features/es-builtins": [ "error" ],
|
|
||||||
"node/no-unsupported-features/node-builtins": [ "error" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "twipped/node-esm",
|
|
||||||
"rules": {
|
|
||||||
"import/first": "off",
|
|
||||||
"import/no-dynamic-require": "off",
|
|
||||||
"import/no-extraneous-dependencies": [ "error", {
|
|
||||||
"devDependencies": [
|
|
||||||
"test/**", // tape, common npm pattern
|
|
||||||
"tests/**", // also common npm pattern
|
|
||||||
"**/test/**", // tape, common npm pattern
|
|
||||||
"**/tests/**", // also common npm pattern
|
|
||||||
"scripts/**", // scripts
|
|
||||||
"**/__tests__/**", // jest pattern
|
|
||||||
"**/__mocks__/**", // jest pattern
|
|
||||||
"**/test.{js,jsx}", // monorepos with a single test file
|
|
||||||
"**/test-*.{js,jsx}", // monorepos with multiple top-level test files
|
|
||||||
"test.{js,jsx}", // repos with a single test file
|
|
||||||
"test-*.{js,jsx}", // repos with multiple top-level test files
|
|
||||||
"**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
|
|
||||||
"**/jest.config.js", // jest config
|
|
||||||
"**/jest.setup.js", // jest setup
|
|
||||||
"**/vue.config.js", // vue-cli config
|
|
||||||
"**/webpack.config.js", // webpack config
|
|
||||||
"**/webpack.config.*.js", // webpack config
|
|
||||||
"**/rollup.config.js", // rollup config
|
|
||||||
"**/rollup.config.*.js", // rollup config
|
|
||||||
"**/gulpfile.js", // gulp config
|
|
||||||
"**/gulpfile.*.js", // gulp config
|
|
||||||
"**/Gruntfile{,.js}", // grunt config
|
|
||||||
"**/protractor.conf.js", // protractor config
|
|
||||||
"**/protractor.conf.*.js", // protractor config
|
|
||||||
"**/karma.conf.js", // karma config
|
|
||||||
"**/.eslintrc", // eslint config
|
|
||||||
"**/.eslintrc.{js,json}", // eslint config
|
|
||||||
"**/**.stories.js", // all storybook files
|
|
||||||
"build/**",
|
|
||||||
"js/$*"
|
|
||||||
],
|
|
||||||
"optionalDependencies": false
|
|
||||||
} ]
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"import/resolver": {
|
|
||||||
"node": { "extensions": [
|
|
||||||
".js",
|
|
||||||
".mjs",
|
|
||||||
".cjs",
|
|
||||||
".jsx",
|
|
||||||
".json",
|
|
||||||
".svg"
|
|
||||||
] },
|
|
||||||
"enhanced-resolve": { "extensions": [
|
|
||||||
".js",
|
|
||||||
".mjs",
|
|
||||||
".cjs",
|
|
||||||
".jsx",
|
|
||||||
".json",
|
|
||||||
".svg"
|
|
||||||
] }
|
|
||||||
},
|
|
||||||
"import/extensions": [
|
|
||||||
".js",
|
|
||||||
".mjs",
|
|
||||||
".cjs",
|
|
||||||
".jsx",
|
|
||||||
".json",
|
|
||||||
".svg"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "twipped/node",
|
"extends": "@twipped/eslint-config/node-cjs",
|
||||||
"rules": {
|
"rules": {
|
||||||
"node/no-unpublished-require": 0,
|
"node/no-unpublished-require": 0,
|
||||||
'indent': [ 2, 2, {
|
"indent": [ 2, 2, {
|
||||||
'MemberExpression': 1,
|
"MemberExpression": 1
|
||||||
} ],
|
} ]
|
||||||
'node/no-unsupported-features/es-syntax': [ 'error' ],
|
|
||||||
'node/no-unsupported-features/es-builtins': [ 'error' ],
|
|
||||||
'node/no-unsupported-features/node-builtins': [ 'error' ],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
build/.eslintrc.json
Normal file
12
build/.eslintrc.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"extends": "../.eslintrc",
|
||||||
|
"rules": {
|
||||||
|
"import/no-extraneous-dependencies": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"devDependencies": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"import/no-dynamic-require": "off"
|
||||||
|
}
|
||||||
|
}
|
@ -63,10 +63,10 @@ const actions = {
|
|||||||
|
|
||||||
// if upscale is not requested, restrict size
|
// if upscale is not requested, restrict size
|
||||||
if (!options.upscale) {
|
if (!options.upscale) {
|
||||||
if (!isNaN(options.width)) {
|
if (!Number.isNaN(options.width)) {
|
||||||
options.width = Math.min(options.width, size.width);
|
options.width = Math.min(options.width, size.width);
|
||||||
}
|
}
|
||||||
if (!isNaN(options.height)) {
|
if (!Number.isNaN(options.height)) {
|
||||||
options.height = Math.min(options.height, size.height);
|
options.height = Math.min(options.height, size.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ function allOf (...args) {
|
|||||||
return (tok) => allBy(args, (check) => check(tok));
|
return (tok) => allBy(args, (check) => check(tok));
|
||||||
}
|
}
|
||||||
|
|
||||||
function isNumber (input) { return typeof input === 'number' && !isNaN(input); }
|
function isNumber (input) { return typeof input === 'number' && !Number.isNaN(input); }
|
||||||
function isString (input) { return typeof input === 'string'; }
|
function isString (input) { return typeof input === 'string'; }
|
||||||
function isBoolean (input) { return typeof input === 'boolean'; }
|
function isBoolean (input) { return typeof input === 'boolean'; }
|
||||||
function isFunction (input) { return typeof input === 'function'; }
|
function isFunction (input) { return typeof input === 'function'; }
|
||||||
@ -807,8 +807,7 @@ function pathinate (object, delimiter = '.') {
|
|||||||
* Iterates over a collection and generates an object based on tuple returned from the iteratee.
|
* Iterates over a collection and generates an object based on tuple returned from the iteratee.
|
||||||
*
|
*
|
||||||
* @param {Object|Array|Map|Set} collection
|
* @param {Object|Array|Map|Set} collection
|
||||||
* @param {Function} iteratee Callback invoked for each item, receives `value, key, index`, returns `[key, value]`;
|
* @param {Function} cb Callback invoked for each item, receives `value, key, index`, returns `[key, value]`;
|
||||||
* @param cb
|
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
function mapReduce (collection, cb) {
|
function mapReduce (collection, cb) {
|
||||||
|
11
gulp/.eslintrc.json
Normal file
11
gulp/.eslintrc.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "../.eslintrc",
|
||||||
|
"rules": {
|
||||||
|
"import/no-extraneous-dependencies": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"devDependencies": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
const { series, watch, src, dest } = require('gulp');
|
const { series, watch, src, dest } = require('gulp');
|
||||||
|
|
||||||
/** **************************************************************************************************************** **/
|
/** */
|
||||||
|
|
||||||
var build = require('../build');
|
var build = require('../build');
|
||||||
|
|
||||||
@ -25,13 +25,13 @@ exports.push = pushToProd;
|
|||||||
const cloudfront = require('./cloudfront');
|
const cloudfront = require('./cloudfront');
|
||||||
exports.cloudfront = cloudfront;
|
exports.cloudfront = cloudfront;
|
||||||
|
|
||||||
exports.new = require('../build/new-post.js');
|
exports.new = require('../build/new-post');
|
||||||
|
|
||||||
function copyProd () {
|
function copyProd () {
|
||||||
return src('dist/**/*').pipe(dest('published'));
|
return src('dist/**/*').pipe(dest('published'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** **************************************************************************************************************** **/
|
/** */
|
||||||
|
|
||||||
exports.dev = series(devBuildTask);
|
exports.dev = series(devBuildTask);
|
||||||
exports.prod = series(prodBuildTask);
|
exports.prod = series(prodBuildTask);
|
||||||
@ -41,11 +41,11 @@ exports.publish = series(
|
|||||||
pushToProd,
|
pushToProd,
|
||||||
cleanTask.prodBackup,
|
cleanTask.prodBackup,
|
||||||
copyProd,
|
copyProd,
|
||||||
cloudfront.prod,
|
cloudfront.prod
|
||||||
);
|
);
|
||||||
exports.testpush = pushToProd.dryrun;
|
exports.testpush = pushToProd.dryrun;
|
||||||
|
|
||||||
/** **************************************************************************************************************** **/
|
/** */
|
||||||
|
|
||||||
function watcher () {
|
function watcher () {
|
||||||
|
|
||||||
@ -88,6 +88,6 @@ function server () {
|
|||||||
exports.watch = series(devBuildTask, watcher);
|
exports.watch = series(devBuildTask, watcher);
|
||||||
exports.uat = series(cleanTask, prodBuildTask, server);
|
exports.uat = series(cleanTask, prodBuildTask, server);
|
||||||
|
|
||||||
/** **************************************************************************************************************** **/
|
/** */
|
||||||
|
|
||||||
exports.default = series(cleanTask.dev, devBuildTask, watcher);
|
exports.default = series(cleanTask.dev, devBuildTask, watcher);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
/* eslint-disable react/prop-types, n/no-missing-import, import/no-unresolved */
|
||||||
|
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
|
||||||
|
|
||||||
/** @jsx h */
|
/** @jsx h */
|
||||||
|
|
||||||
import { h, render, Component, Fragment } from 'preact';
|
import { h, render, Component, Fragment } from 'preact';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
module.exports = exports = {
|
module.exports = exports = {
|
||||||
extends: 'twipped/browser',
|
extends: '@twipped/eslint-config/browser',
|
||||||
env: { es6: true, jquery: true },
|
env: { es6: true, jquery: true },
|
||||||
rules: {
|
rules: {
|
||||||
'indent': [ 2, 2, {
|
'indent': [ 2, 2, {
|
||||||
@ -8,17 +8,17 @@ module.exports = exports = {
|
|||||||
} ],
|
} ],
|
||||||
'prefer-arrow-callback': 0,
|
'prefer-arrow-callback': 0,
|
||||||
'object-shorthand': 0,
|
'object-shorthand': 0,
|
||||||
'node/no-unsupported-features/node-builtins': 0,
|
'n/no-unsupported-features/node-builtins': 0,
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: '$*.jsx',
|
files: '$*.jsx',
|
||||||
extends: 'twipped/react',
|
extends: '@twipped/eslint-config/react',
|
||||||
rules: {
|
rules: {
|
||||||
'react/jsx-indent': [ 2, 2, { checkAttributes: true } ],
|
'react/jsx-indent': [ 2, 2, { checkAttributes: true } ],
|
||||||
'react/no-unknown-property': [ 2, { ignore: [ 'class' ] } ],
|
'react/no-unknown-property': [ 2, { ignore: [ 'class' ] } ],
|
||||||
'node/no-unpublished-import': 0,
|
'n/no-unpublished-import': 0,
|
||||||
'node/no-missing-import': [ 'error', {
|
'n/no-missing-import': [ 'error', {
|
||||||
'allowModules': [ 'svg', 'react' ],
|
'allowModules': [ 'svg', 'react' ],
|
||||||
} ],
|
} ],
|
||||||
},
|
},
|
||||||
|
12771
package-lock.json
generated
12771
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,8 @@
|
|||||||
"description": "Code for construction of the GenderDysphoria.fyi website",
|
"description": "Code for construction of the GenderDysphoria.fyi website",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "eslint 'build/**/*.js' 'js/**/*.{js,jsx}' --fix",
|
"test": "eslint 'build/**/*.js' 'js/**/*.{js,jsx}' --fix",
|
||||||
"build": "gulp prod"
|
"build": "gulp prod",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "16"
|
"node": "16"
|
||||||
@ -31,11 +32,12 @@
|
|||||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||||
"@babel/preset-env": "^7.20.2",
|
"@babel/preset-env": "^7.20.2",
|
||||||
"@rollup/plugin-alias": "^3.1.5",
|
"@rollup/plugin-alias": "^3.1.5",
|
||||||
|
"@rollup/plugin-babel": "^6.0.3",
|
||||||
"@rollup/plugin-commonjs": "^24.0.0",
|
"@rollup/plugin-commonjs": "^24.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||||
"@rollup/plugin-replace": "^5.0.2",
|
"@rollup/plugin-replace": "^5.0.2",
|
||||||
"@rollup/plugin-babel": "^6.0.3",
|
|
||||||
"@rollup/plugin-terser": "^0.2.1",
|
"@rollup/plugin-terser": "^0.2.1",
|
||||||
|
"@twipped/eslint-config": "^7.5.2",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"aws-sdk": "^2.1286.0",
|
"aws-sdk": "^2.1286.0",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
@ -47,7 +49,6 @@
|
|||||||
"crass": "^0.12.3",
|
"crass": "^0.12.3",
|
||||||
"date-fns": "^2.29.3",
|
"date-fns": "^2.29.3",
|
||||||
"eslint": "^8.31.0",
|
"eslint": "^8.31.0",
|
||||||
"eslint-config-twipped": "^7.2.0",
|
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"eslint-plugin-react": "^7.31.11",
|
"eslint-plugin-react": "^7.31.11",
|
||||||
|
@ -13,6 +13,6 @@ module.exports = exports = {
|
|||||||
TRANS_TWITTER_TOPICS: 'Trans Twitter Topics',
|
TRANS_TWITTER_TOPICS: 'Trans Twitter Topics',
|
||||||
MISSING_TWEET_FOR: 'Missing tweet for ',
|
MISSING_TWEET_FOR: 'Missing tweet for ',
|
||||||
QUOTED_TWEET_UNAVAILABLE: 'Quoted Tweet Unavailable',
|
QUOTED_TWEET_UNAVAILABLE: 'Quoted Tweet Unavailable',
|
||||||
TWEET_DATE_FORMAT: 'h:mm aa - EEE, LLL do, yyyy'
|
TWEET_DATE_FORMAT: 'h:mm aa - EEE, LLL do, yyyy',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,6 @@ module.exports = exports = {
|
|||||||
TRANS_TWITTER_TOPICS: 'Temas Trans en Twitter',
|
TRANS_TWITTER_TOPICS: 'Temas Trans en Twitter',
|
||||||
MISSING_TWEET_FOR: 'Tweet faltante ',
|
MISSING_TWEET_FOR: 'Tweet faltante ',
|
||||||
QUOTED_TWEET_UNAVAILABLE: 'Tweet citado no disponible',
|
QUOTED_TWEET_UNAVAILABLE: 'Tweet citado no disponible',
|
||||||
TWEET_DATE_FORMAT: 'HH:mm - EEE, dd/LLL/yyyy'
|
TWEET_DATE_FORMAT: 'HH:mm - EEE, dd/LLL/yyyy',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,6 @@ module.exports = exports = {
|
|||||||
TRANS_TWITTER_TOPICS: 'Topics de Trans Twitter',
|
TRANS_TWITTER_TOPICS: 'Topics de Trans Twitter',
|
||||||
MISSING_TWEET_FOR: 'Tweet faltante ',
|
MISSING_TWEET_FOR: 'Tweet faltante ',
|
||||||
QUOTED_TWEET_UNAVAILABLE: 'Tweet citado no disponible',
|
QUOTED_TWEET_UNAVAILABLE: 'Tweet citado no disponible',
|
||||||
TWEET_DATE_FORMAT: 'HH:mm - EEE, dd/LLL/yyyy'
|
TWEET_DATE_FORMAT: 'HH:mm - EEE, dd/LLL/yyyy',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@ module.exports = exports = {
|
|||||||
TRANS_TWITTER_TOPICS: 'Trans Twitter Topics',
|
TRANS_TWITTER_TOPICS: 'Trans Twitter Topics',
|
||||||
MISSING_TWEET_FOR: 'Missing tweet for ',
|
MISSING_TWEET_FOR: 'Missing tweet for ',
|
||||||
QUOTED_TWEET_UNAVAILABLE: 'Quoted Tweet Unavailable',
|
QUOTED_TWEET_UNAVAILABLE: 'Quoted Tweet Unavailable',
|
||||||
TWEET_DATE_FORMAT: 'hh:mm aa - EEE, LLL do, yyyy'
|
TWEET_DATE_FORMAT: 'hh:mm aa - EEE, LLL do, yyyy',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
|
||||||
|
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const morgan = require('morgan');
|
const morgan = require('morgan');
|
||||||
const directory = require('serve-index');
|
const directory = require('serve-index');
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "twipped/browser",
|
"extends": "@twipped/eslint-config/browser",
|
||||||
"env": {"es6": true},
|
"env": {"es6": true},
|
||||||
"parserOptions": {"ecmaVersion": 2018},
|
"parserOptions": {"ecmaVersion": 2018},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "twipped/node",
|
"extends": "@twipped/eslint-config/node-cjs",
|
||||||
"rules": {
|
"rules": {
|
||||||
"node/no-unpublished-require": 0,
|
"node/no-unpublished-require": 0,
|
||||||
"indent": [ 2, 2, {
|
"indent": [ 2, 2, {
|
||||||
"MemberExpression": 1
|
"MemberExpression": 1
|
||||||
} ],
|
} ]
|
||||||
"node/no-unsupported-features/es-syntax": [ "error" ],
|
|
||||||
"node/no-unsupported-features/es-builtins": [ "error" ],
|
|
||||||
"node/no-unsupported-features/node-builtins": [ "error" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* eslint no-console:0, no-process-exit:0 */
|
/* eslint-disable no-console, no-process-exit, n/no-process-exit */
|
||||||
|
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
|
||||||
|
|
||||||
const argv = require('minimist')(process.argv.slice(2));
|
const argv = require('minimist')(process.argv.slice(2));
|
||||||
const thread = require('./build/twitter-thread');
|
const thread = require('./build/twitter-thread');
|
||||||
@ -17,5 +18,5 @@ thread(tweet).then(
|
|||||||
}, (err) => {
|
}, (err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user