Skip to content

Commit

Permalink
updated to ESLint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 29, 2024
1 parent c2285dc commit 56d48f5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 43 deletions.
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npx eslint src/assets/netteForms.js
30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import globals from 'globals';
import pluginJs from '@eslint/js';

export default [
pluginJs.configs.recommended,
{
languageOptions: {
ecmaVersion: 6,
globals: {
...globals.browser,
'Tracy': 'writeable',
'define': 'readable',
'module': 'readable',
},
},
ignores: ['**/*.min.js'],
rules: {
indent: ['error', 'tab'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'func-style': ['error', 'expression'],
'prefer-arrow-callback': ['error'],
'arrow-parens': ['error'],
'arrow-spacing': ['error'],
'no-unused-vars': ['error', {
'caughtErrors': 'none',
}],
},
},
];
43 changes: 24 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"name": "nette-forms",
"version": "3.3.6",
"description": "Client side script for Nette Forms Component",
"keywords": [
"nette",
"validation",
"forms"
],
"homepage": "https://nette.org",
"author": "David Grudl (https://davidgrudl.com)",
"license": "BSD-3-Clause",
"main": "src/assets/netteForms.js",
"files": [
"src/assets"
],
"repository": {
"type": "git",
"url": "git+https://github.com/nette/forms.git"
}
"name": "nette-forms",
"version": "3.3.6",
"description": "Client side script for Nette Forms Component",
"keywords": [
"nette",
"validation",
"forms"
],
"homepage": "https://nette.org",
"author": "David Grudl (https://davidgrudl.com)",
"license": "BSD-3-Clause",
"main": "src/assets/netteForms.js",
"files": [
"src/assets"
],
"repository": {
"type": "git",
"url": "git+https://github.com/nette/forms.git"
},
"devDependencies": {
"@eslint/js": "^9.1.1",
"eslint": "^9.1.1",
"globals": "^15.1.0"
}
}

0 comments on commit 56d48f5

Please sign in to comment.