Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLINT #32

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public/**
quotes/*
.github/*
.vscode/*
node_modules/**
scripts/*
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Based on the work of [Johannes Enevoldsen](https://twitter.com/JohsEnevoldsen) (
- Accessibility: All the quote elements have `aria-labels`
- All the settings are saved in the browser's local storage and they are updated in the URL without refreshing the page, thanks to History API


## Settings

The clock can be controlled using URL parameters, these parameters will overwrite the existing configuration
Expand All @@ -38,7 +37,7 @@ The clock can be controlled using URL parameters, these parameters will overwrit
- `showtime`: enable/disable the clock on top of the screen

Developer settings

- `time`: get the quotes for a particular time ([link](https://literatureclock.netlify.app/?time=12:30))
- `quote`: test a quote before submitting it ([link](https://literatureclock.netlify.app/?quote=Hi%20mom!%20I%27m%20part%20of%20the%20Literature%20Clock!)) (it is no necessary to escape the quote by adding the special characters, just write the quote and the browser will add them)
- `index`: get a specific quote from the array of quotes instead of a random one
Expand Down
20 changes: 20 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.browser } },
{ ignores: ['dist/*', 'quotes/*', 'public/times/**'] },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
{
rules: {
'no-console': 'warn',
quotes: ['error', 'single'],
'linebreak-style': ['error', 'unix'],
},
},
];
136 changes: 29 additions & 107 deletions index.html

Large diffs are not rendered by default.

Loading