mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
corrected file endings or removed them where possible
This commit is contained in:
parent
198bb2ddd9
commit
c436cb52b1
@ -2,17 +2,17 @@ module.exports = {
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: [
|
||||
'**/*.js',
|
||||
'**/*.ts',
|
||||
'!**/node_modules/**',
|
||||
'!**/test/**',
|
||||
'!**/build/**',
|
||||
'!**/src/**/?(*.)+(spec|test).js?(x)'
|
||||
'!**/src/**/?(*.)+(spec|test).ts?(x)'
|
||||
],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
lines: 57,
|
||||
},
|
||||
},
|
||||
testMatch: ['**/src/**/?(*.)+(spec|test).js?(x)'],
|
||||
setupFilesAfterEnv: ['<rootDir>/test/setup.js']
|
||||
testMatch: ['**/src/**/?(*.)+(spec|test).ts?(x)'],
|
||||
setupFilesAfterEnv: ['<rootDir>/test/setup.ts']
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import dotenv from 'dotenv'
|
||||
import emails from './emails.js'
|
||||
import metadata from './metadata.js'
|
||||
import emails from './emails'
|
||||
import metadata from './metadata'
|
||||
|
||||
// Load env file
|
||||
if (require.resolve) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// this file is duplicated in `backend/src/config/logos.js` and `webapp/constants/logos.js` and replaced on rebranding
|
||||
// this file is duplicated in `backend/src/config/logos` and `webapp/constants/logos.js` and replaced on rebranding
|
||||
// this are the paths in the webapp
|
||||
export default {
|
||||
LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js` and replaced on rebranding
|
||||
// this file is duplicated in `backend/src/config/metadata` and `webapp/constants/metadata.js` and replaced on rebranding
|
||||
export default {
|
||||
APPLICATION_NAME: 'ocelot.social',
|
||||
APPLICATION_SHORT_NAME: 'ocelot',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// this file is duplicated in `backend/src/constants/metadata.js` and `webapp/constants/metadata.js`
|
||||
// this file is duplicated in `backend/src/constants/metadata` and `webapp/constants/metadata.js`
|
||||
export const CATEGORIES_MIN = 1
|
||||
export const CATEGORIES_MAX = 3
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// this file is duplicated in `backend/src/constants/group.js` and `webapp/constants/group.js`
|
||||
// this file is duplicated in `backend/src/constants/group` and `webapp/constants/group.js`
|
||||
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
||||
export const DESCRIPTION_EXCERPT_HTML_LENGTH = 250 // with removed HTML tags
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js`
|
||||
// this file is duplicated in `backend/src/config/metadata` and `webapp/constants/metadata.js`
|
||||
export default {
|
||||
NONCE_LENGTH: 5,
|
||||
INVITE_CODE_LENGTH: 6,
|
||||
|
||||
@ -4,8 +4,8 @@ import { hashSync } from 'bcryptjs'
|
||||
import { Factory } from 'rosie'
|
||||
import { faker } from '@faker-js/faker'
|
||||
import { getDriver, getNeode } from './neo4j'
|
||||
import CONFIG from '../config/index.js'
|
||||
import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode.js'
|
||||
import CONFIG from '../config/index'
|
||||
import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode'
|
||||
|
||||
const neode = getNeode()
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import CONFIG from '../../../config'
|
||||
import { cleanHtml } from '../../../middleware/helpers/cleanHtml.js'
|
||||
import { cleanHtml } from '../../../middleware/helpers/cleanHtml'
|
||||
import nodemailer from 'nodemailer'
|
||||
import { htmlToText } from 'nodemailer-html-to-text'
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import CONFIG from '../../../config'
|
||||
import logosWebapp from '../../../config/logos.js'
|
||||
import logosWebapp from '../../../config/logos'
|
||||
import {
|
||||
signupTemplate,
|
||||
emailVerificationTemplate,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import mustache from 'mustache'
|
||||
import CONFIG from '../../../config'
|
||||
import metadata from '../../../config/metadata.js'
|
||||
import logosWebapp from '../../../config/logos.js'
|
||||
import metadata from '../../../config/metadata'
|
||||
import logosWebapp from '../../../config/logos'
|
||||
|
||||
import * as templates from './templates'
|
||||
import * as templatesEN from './templates/en'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import LanguageDetect from 'languagedetect'
|
||||
import { removeHtmlTags } from '../helpers/cleanHtml.js'
|
||||
import { removeHtmlTags } from '../helpers/cleanHtml'
|
||||
|
||||
const setPostLanguage = (text) => {
|
||||
const lngDetector = new LanguageDetect()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import walkRecursive from '../helpers/walkRecursive'
|
||||
import { cleanHtml } from '../middleware/helpers/cleanHtml.js'
|
||||
import { cleanHtml } from '../middleware/helpers/cleanHtml'
|
||||
|
||||
// exclamation mark separetes field names, that should not be sanitized
|
||||
const fields = [
|
||||
|
||||
@ -2,37 +2,37 @@
|
||||
// module that is not browser-compatible. Node's `fs` module is server-side only
|
||||
declare var Cypress: any | undefined
|
||||
export default {
|
||||
Image: typeof Cypress !== 'undefined' ? require('./Image.js') : require('./Image.js').default,
|
||||
Badge: typeof Cypress !== 'undefined' ? require('./Badge.js') : require('./Badge.js').default,
|
||||
User: typeof Cypress !== 'undefined' ? require('./User.js') : require('./User.js').default,
|
||||
Group: typeof Cypress !== 'undefined' ? require('./Group.js') : require('./Group.js').default,
|
||||
Image: typeof Cypress !== 'undefined' ? require('./Image') : require('./Image').default,
|
||||
Badge: typeof Cypress !== 'undefined' ? require('./Badge') : require('./Badge').default,
|
||||
User: typeof Cypress !== 'undefined' ? require('./User') : require('./User').default,
|
||||
Group: typeof Cypress !== 'undefined' ? require('./Group') : require('./Group').default,
|
||||
EmailAddress:
|
||||
typeof Cypress !== 'undefined'
|
||||
? require('./EmailAddress.js')
|
||||
: require('./EmailAddress.js').default,
|
||||
? require('./EmailAddress')
|
||||
: require('./EmailAddress').default,
|
||||
UnverifiedEmailAddress:
|
||||
typeof Cypress !== 'undefined'
|
||||
? require('./UnverifiedEmailAddress.js')
|
||||
: require('./UnverifiedEmailAddress.js').default,
|
||||
? require('./UnverifiedEmailAddress')
|
||||
: require('./UnverifiedEmailAddress').default,
|
||||
SocialMedia:
|
||||
typeof Cypress !== 'undefined'
|
||||
? require('./SocialMedia.js')
|
||||
: require('./SocialMedia.js').default,
|
||||
Post: typeof Cypress !== 'undefined' ? require('./Post.js') : require('./Post.js').default,
|
||||
? require('./SocialMedia')
|
||||
: require('./SocialMedia').default,
|
||||
Post: typeof Cypress !== 'undefined' ? require('./Post') : require('./Post').default,
|
||||
Comment:
|
||||
typeof Cypress !== 'undefined' ? require('./Comment.js') : require('./Comment.js').default,
|
||||
typeof Cypress !== 'undefined' ? require('./Comment') : require('./Comment').default,
|
||||
Category:
|
||||
typeof Cypress !== 'undefined' ? require('./Category.js') : require('./Category.js').default,
|
||||
Tag: typeof Cypress !== 'undefined' ? require('./Tag.js') : require('./Tag.js').default,
|
||||
typeof Cypress !== 'undefined' ? require('./Category') : require('./Category').default,
|
||||
Tag: typeof Cypress !== 'undefined' ? require('./Tag') : require('./Tag').default,
|
||||
Location:
|
||||
typeof Cypress !== 'undefined' ? require('./Location.js') : require('./Location.js').default,
|
||||
typeof Cypress !== 'undefined' ? require('./Location') : require('./Location').default,
|
||||
Donations:
|
||||
typeof Cypress !== 'undefined' ? require('./Donations.js') : require('./Donations.js').default,
|
||||
Report: typeof Cypress !== 'undefined' ? require('./Report.js') : require('./Report.js').default,
|
||||
typeof Cypress !== 'undefined' ? require('./Donations') : require('./Donations').default,
|
||||
Report: typeof Cypress !== 'undefined' ? require('./Report') : require('./Report').default,
|
||||
Migration:
|
||||
typeof Cypress !== 'undefined' ? require('./Migration.js') : require('./Migration.js').default,
|
||||
typeof Cypress !== 'undefined' ? require('./Migration') : require('./Migration').default,
|
||||
InviteCode:
|
||||
typeof Cypress !== 'undefined'
|
||||
? require('./InviteCode.js')
|
||||
: require('./InviteCode.js').default,
|
||||
? require('./InviteCode')
|
||||
: require('./InviteCode').default,
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import scrape from './embeds/scraper.js'
|
||||
import scrape from './embeds/scraper'
|
||||
import { undefinedToNullResolver } from './helpers/Resolver'
|
||||
|
||||
export default {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { getMutedUsers } from '../users.js'
|
||||
import { getMutedUsers } from '../users'
|
||||
import { mergeWith, isArray } from 'lodash'
|
||||
|
||||
export const filterForMutedUsers = async (params, context) => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import path from 'path'
|
||||
import { fileLoader, mergeResolvers } from 'merge-graphql-schemas'
|
||||
|
||||
const resolversArray = fileLoader(path.join(__dirname, './!(*.spec).js'))
|
||||
const resolversArray = fileLoader(path.join(__dirname, './!(*.spec).ts'))
|
||||
export default mergeResolvers(resolversArray)
|
||||
|
||||
@ -5,7 +5,7 @@ type FILED {
|
||||
submitter: User
|
||||
}
|
||||
|
||||
# this list equals the strings of an array in file "webapp/constants/modals.js"
|
||||
# this list equals the strings of an array in file "webapp/constants/modals"
|
||||
enum ReasonCategory {
|
||||
other
|
||||
discrimination_etc
|
||||
|
||||
@ -107,5 +107,5 @@
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
},
|
||||
"include": ["./src/**/*"],
|
||||
"exclude": ["./src/**/*.spec.ts", "./src/**/*.spec.js"]
|
||||
"exclude": ["./src/**/*.spec.ts"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user