Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

eslint-plugin-urlaubsverwaltung

custom eslint rules for the Open Source Urlaubsverwaltung application.

Rules

@urlaubsverwaltung/no-date-fns

some date-fns functions like format are wrapped by the application with special behaviour.
(e.g. internationalisation or date patterns)

valid:

import format from "../lib/date-fns/format";
import startOfWeek from "../lib/date-fns/startOfWeek";

invaild:

import { format } from "date-fns";
import { startOfWeek } from "date-fns";
import DateFns from "date-fns";

@urlaubsverwaltung/no-global-fetch

global fetch api should not be used in favor of an abstraction layer. this layer could handle JSON serialisation for instance, or authorization and common error handling.

valid:

import * as fetch from "../lib/http";

fetch.json('/api');
import fetch from "fetch";

fetch('/api');
function fetch() {
  // ...
}

fetch('/api');

invaild:

fetch('/api')
window.fetch('/api')
global.fetch('/api')

About

custom eslint rules for the open source urlaubsverwaltung application

Resources

License

Packages

No packages published