nedpals/sulatcms

View on GitHub

Showing 4 of 4 total issues

Function netlifyIdentityPlugin has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function netlifyIdentityPlugin(options = {}): Plugin {
    const emt: mitt.Emitter = new mitt();

    const netlifyIdentity = {
        on: emt.on,
Severity: Major
Found in src/plugins/netlify-identity.ts - About 2 hrs to fix

    Function customAPIPlugin has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function customAPIPlugin(options?: PluginOptions): Plugin {
        function mapFileObject(file) {
            return {
                title: traverseData(options.fields.title || 'title', file),
                content: traverseData(options.fields.summary || 'content', file),
    Severity: Minor
    Found in src/plugins/custom-api.ts - About 2 hrs to fix

      Function buildRoutes has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function buildRoutes(routes: { [path: string]: Route }, store: SiteStore) {
          let generated = {};
      
          Object.keys(routes).forEach(path => {
              const _route = routes[path] as Route;
      Severity: Minor
      Found in src/router.ts - About 1 hr to fix

        Function initialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function initialize(options: SulatOptions) {
            const store: SiteStore = createSession();
        
            store.setState({
                config: {
        Severity: Minor
        Found in src/app.ts - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language