fix: 🐛 removed dist prior to ignore, more lint errors fix

This commit is contained in:
Viktor Sarström 2021-11-27 20:53:05 +01:00
parent e19c8a7747
commit 78f757783f
12 changed files with 36 additions and 35 deletions

View File

@ -1,6 +1,5 @@
import { etjanst } from './etjanst'
import { CalendarItem } from '../../../api/lib/types'
import { parseDate } from '../../../api/lib/utils/dateHandling'
import { CalendarItem, parseDate } from '@skolplattformen/api'
export const calendarItem = ({
id,

View File

@ -1,5 +1,5 @@
import { Child } from '@skolplattformen/api'
import { etjanst } from './etjanst'
import { Child } from '../../../api/lib/types'
export const child = ({ id, sdsId, name, status, schoolId }: any): Child => ({
id,

View File

@ -1,5 +1,5 @@
import { Classmate, Guardian } from '@skolplattformen/api'
import { etjanst } from './etjanst'
import { Classmate, Guardian } from '../../../api/lib/types'
export const guardian = ({
emailhome,

View File

@ -1,6 +1,6 @@
import { MenuItem, MenuList, toMarkdown } from '@skolplattformen/api'
import { etjanst } from './etjanst'
import { toMarkdown } from '../../../api/lib/parseHtml'
import { MenuItem, MenuList } from '../../../api/lib/types'
export const menuItem = ({ title, description }: any): MenuItem => ({
title,

View File

@ -1,7 +1,6 @@
import { NewsItem, parseDate, toMarkdown } from '@skolplattformen/api';
import { etjanst } from './etjanst'
import { toMarkdown } from '../../../api/lib/parseHtml'
import { NewsItem } from '../../../api/lib/types'
import { parseDate } from '../../../api/lib/utils/dateHandling'
const IMAGE_HOST =
'https://etjanst.stockholm.se/Vardnadshavare/inloggad2/NewsBanner?url='

View File

@ -1,6 +1,5 @@
import { parseDate, Notification } from '@skolplattformen/api'
import { etjanst } from './etjanst'
import { parseDate } from '../../../api/lib/utils/dateHandling'
import { Notification } from '../../../api/lib/types'
export const notification = ({
notification: { messageid, dateCreated, dateModified },

View File

@ -1,6 +1,5 @@
import { parseDate, ScheduleItem } from '@skolplattformen/api'
import { etjanst } from './etjanst'
import { ScheduleItem } from '../../../api/lib/types'
import { parseDate } from '../../../api/lib/utils/dateHandling'
export const scheduleItem = ({
title,

View File

@ -1,6 +1,6 @@
import { TimetableEntry } from '@skolplattformen/api'
import parse, { Language } from '@skolplattformen/curriculum'
import { DateTime } from 'luxon'
import { TimetableEntry } from '../../../api/lib/types'
const calculateDate = (
year: number,

View File

@ -1,4 +1,4 @@
import { User } from '../../../api/lib/types'
import { User } from "@skolplattformen/api";
export const user = ({
socialSecurityNumber,

23
libs/api/.eslintrc Normal file
View File

@ -0,0 +1,23 @@
{
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "public", ".cache", "node_modules"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]
}

View File

@ -1,19 +0,0 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
project: ['./tsconfig.eslint.json'],
},
extends: ['airbnb-typescript/base', 'prettier'],
plugins: ['prettier'],
ignorePatterns: ['*.test.ts'],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
// '@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/semi': [2, 'never'],
'max-len': ['error', { code: 120, ignoreUrls: true }],
'import/prefer-default-export': 0,
},
}

View File

@ -14,4 +14,5 @@ export {
export { URLSearchParams } from './URLSearchParams'
export { wrap };
export { FeatureType, Features } from './features'
export { FeatureType, Features } from './features'
export * from './utils/dateHandling';