eser 2.1.9 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/deno.json +6 -0
  2. package/deno.lock +41 -0
  3. package/hizli-api.js +90 -0
  4. package/main.js +5 -0
  5. package/mod.js +3 -0
  6. package/mod_test.js +5 -0
  7. package/package.json +8 -37
  8. package/.editorconfig +0 -14
  9. package/.gitattributes +0 -11
  10. package/.github/FUNDING.yml +0 -5
  11. package/LICENSE +0 -22
  12. package/README.md +0 -3794
  13. package/css-in-javascript/README.md +0 -432
  14. package/linters/.eslintrc +0 -6
  15. package/linters/.markdownlint.json +0 -154
  16. package/packages/eslint-config-eser/.editorconfig +0 -14
  17. package/packages/eslint-config-eser/.eslintrc +0 -3
  18. package/packages/eslint-config-eser/README.md +0 -19
  19. package/packages/eslint-config-eser/index.js +0 -20
  20. package/packages/eslint-config-eser/package.json +0 -49
  21. package/packages/eslint-config-eser/rules/best-practices.js +0 -381
  22. package/packages/eslint-config-eser/rules/errors.js +0 -146
  23. package/packages/eslint-config-eser/rules/es6.js +0 -203
  24. package/packages/eslint-config-eser/rules/imports.js +0 -291
  25. package/packages/eslint-config-eser/rules/node.js +0 -43
  26. package/packages/eslint-config-eser/rules/strict.js +0 -5
  27. package/packages/eslint-config-eser/rules/style.js +0 -597
  28. package/packages/eslint-config-eser/rules/variables.js +0 -53
  29. package/packages/eslint-config-eser-react/.editorconfig +0 -14
  30. package/packages/eslint-config-eser-react/.eslintrc +0 -3
  31. package/packages/eslint-config-eser-react/README.md +0 -19
  32. package/packages/eslint-config-eser-react/index.js +0 -11
  33. package/packages/eslint-config-eser-react/package.json +0 -59
  34. package/packages/eslint-config-eser-react/rules/react-a11y.js +0 -275
  35. package/packages/eslint-config-eser-react/rules/react-hooks.js +0 -21
  36. package/packages/eslint-config-eser-react/rules/react.js +0 -600
  37. package/react/README.md +0 -717
@@ -1,19 +0,0 @@
1
- # [Eser: JavaScript Style Guide](https://github.com/eserozvataf/eser)
2
-
3
- This package consists of ESLint rule definitions for [eser](https://github.com/eserozvataf/eser).
4
-
5
- To use this package, execute:
6
-
7
- ```sh
8
- npm install eslint eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-config-eser-react --save-dev
9
- ```
10
-
11
- Then create an `.eslintrc` file:
12
-
13
- ```json
14
- {
15
- "extends": "eser-react"
16
- }
17
- ```
18
-
19
- See [main repository](https://github.com/eserozvataf/eser) for further details.
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- 'extends': [
3
- 'eslint-config-eser',
4
- './rules/react',
5
- './rules/react-a11y',
6
- './rules/react-hooks',
7
- ].map(require.resolve),
8
-
9
- 'rules': {
10
- },
11
- };
@@ -1,59 +0,0 @@
1
- {
2
- "name": "eslint-config-eser-react",
3
- "version": "2.1.9",
4
- "description": "Eser's ESLint config for React, following our styleguide",
5
- "main": "index.js",
6
- "scripts": {
7
- "cleanup": "rm -rf yarn.lock node_modules/",
8
- "prelint": "# editorconfig-tools check *",
9
- "lint": "eslint ./",
10
- "lint:fix": "eslint --fix ./",
11
- "test": "",
12
- "test:coverage": ""
13
- },
14
- "repository": {
15
- "type": "git",
16
- "url": "https://github.com/eserozvataf/eser"
17
- },
18
- "keywords": [
19
- "eslint",
20
- "eslintconfig",
21
- "config",
22
- "eser",
23
- "airbnb",
24
- "javascript",
25
- "styleguide",
26
- "react",
27
- "hooks",
28
- "jsx",
29
- "a11y"
30
- ],
31
- "author": "Eser Ozvataf <eser@ozvataf.com> (https://twitter.com/eser)",
32
- "license": "MIT",
33
- "bugs": {
34
- "url": "https://github.com/eserozvataf/eser/issues"
35
- },
36
- "homepage": "https://github.com/eserozvataf/eser",
37
- "dependencies": {
38
- "eslint-config-eser": "^2.1.9"
39
- },
40
- "devDependencies": {
41
- "editorconfig-tools": "^0.1.1",
42
- "eslint": "^7.4.0",
43
- "eslint-find-rules": "^3.5.0",
44
- "eslint-plugin-import": "^2.22.0",
45
- "eslint-plugin-jsx-a11y": "^6.3.1",
46
- "eslint-plugin-react": "^7.20.3",
47
- "eslint-plugin-react-hooks": "^4.0.5"
48
- },
49
- "peerDependencies": {
50
- "eslint": "^7.4.0",
51
- "eslint-plugin-import": "^2.22.0",
52
- "eslint-plugin-jsx-a11y": "^6.3.1",
53
- "eslint-plugin-react": "^7.20.3",
54
- "eslint-plugin-react-hooks": "^4.0.5"
55
- },
56
- "engines": {
57
- "node": ">= 6"
58
- }
59
- }
@@ -1,275 +0,0 @@
1
- module.exports = {
2
- plugins: [
3
- 'jsx-a11y',
4
- 'react',
5
- ],
6
-
7
- parserOptions: {
8
- ecmaFeatures: {
9
- jsx: true,
10
- },
11
- },
12
-
13
- rules: {
14
- // Enforce that anchors have content
15
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md
16
- 'jsx-a11y/anchor-has-content': [ 'error', { components: [] } ],
17
-
18
- // Require ARIA roles to be valid and non-abstract
19
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md
20
- 'jsx-a11y/aria-role': [ 'error', { ignoreNonDom: false } ],
21
-
22
- // Enforce all aria-* props are valid.
23
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md
24
- 'jsx-a11y/aria-props': 'error',
25
-
26
- // Enforce ARIA state and property values are valid.
27
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md
28
- 'jsx-a11y/aria-proptypes': 'error',
29
-
30
- // Enforce that elements that do not support ARIA roles, states, and
31
- // properties do not have those attributes.
32
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md
33
- 'jsx-a11y/aria-unsupported-elements': 'error',
34
-
35
- // Enforce that all elements that require alternative text have meaningful information
36
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
37
- 'jsx-a11y/alt-text': [
38
- 'error',
39
- {
40
- 'elements': [ 'img', 'object', 'area', 'input[type="image"]' ],
41
- 'img': [],
42
- 'object': [],
43
- 'area': [],
44
- 'input[type="image"]': [],
45
- },
46
- ],
47
-
48
- // Prevent img alt text from containing redundant words like "image", "picture", or "photo"
49
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md
50
- 'jsx-a11y/img-redundant-alt': 'error',
51
-
52
- // require that JSX labels use "htmlFor"
53
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
54
- // deprecated: replaced by `label-has-associated-control` rule
55
- 'jsx-a11y/label-has-for': [
56
- 'off',
57
- {
58
- components: [],
59
- required: {
60
- every: [ 'nesting', 'id' ],
61
- },
62
- allowChildren: false,
63
- },
64
- ],
65
-
66
- // Enforce that a label tag has a text label and an associated control.
67
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md
68
- 'jsx-a11y/label-has-associated-control': [
69
- 'error',
70
- {
71
- labelComponents: [],
72
- labelAttributes: [],
73
- controlComponents: [],
74
- assert: 'both',
75
- depth: 25,
76
- },
77
- ],
78
-
79
- // Enforce that a control (an interactive element) has a text label.
80
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md
81
- 'jsx-a11y/control-has-associated-label': [
82
- 'error',
83
- {
84
- labelAttributes: [ 'label' ],
85
- controlComponents: [],
86
- ignoreElements: [
87
- 'audio',
88
- 'canvas',
89
- 'embed',
90
- 'input',
91
- 'textarea',
92
- 'tr',
93
- 'video',
94
- ],
95
- ignoreRoles: [
96
- 'grid',
97
- 'listbox',
98
- 'menu',
99
- 'menubar',
100
- 'radiogroup',
101
- 'row',
102
- 'tablist',
103
- 'toolbar',
104
- 'tree',
105
- 'treegrid',
106
- ],
107
- depth: 5,
108
- },
109
- ],
110
-
111
- // require that mouseover/out come with focus/blur, for keyboard-only users
112
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
113
- 'jsx-a11y/mouse-events-have-key-events': 'error',
114
-
115
- // Prevent use of `accessKey`
116
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md
117
- 'jsx-a11y/no-access-key': 'error',
118
-
119
- // require onBlur instead of onChange
120
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md
121
- 'jsx-a11y/no-onchange': 'off',
122
-
123
- // Elements with an interactive role and interaction handlers must be focusable
124
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md
125
- 'jsx-a11y/interactive-supports-focus': 'error',
126
-
127
- // Enforce that elements with ARIA roles must have all required attributes
128
- // for that role.
129
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md
130
- 'jsx-a11y/role-has-required-aria-props': 'error',
131
-
132
- // Enforce that elements with explicit or implicit roles defined contain
133
- // only aria-* properties supported by that role.
134
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md
135
- 'jsx-a11y/role-supports-aria-props': 'error',
136
-
137
- // Enforce tabIndex value is not greater than zero.
138
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md
139
- 'jsx-a11y/tabindex-no-positive': 'error',
140
-
141
- // ensure <hX> tags have content and are not aria-hidden
142
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md
143
- 'jsx-a11y/heading-has-content': [ 'error', { components: [ '' ] } ],
144
-
145
- // require HTML elements to have a "lang" prop
146
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md
147
- 'jsx-a11y/html-has-lang': 'error',
148
-
149
- // require HTML element's lang prop to be valid
150
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
151
- 'jsx-a11y/lang': 'error',
152
-
153
- // prevent distracting elements, like <marquee> and <blink>
154
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md
155
- 'jsx-a11y/no-distracting-elements': [
156
- 'error',
157
- {
158
- elements: [ 'marquee', 'blink' ],
159
- },
160
- ],
161
-
162
- // only allow <th> to have the "scope" attr
163
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md
164
- 'jsx-a11y/scope': 'error',
165
-
166
- // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress
167
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
168
- 'jsx-a11y/click-events-have-key-events': 'error',
169
-
170
- // Enforce that DOM elements without semantic behavior not have interaction handlers
171
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
172
- 'jsx-a11y/no-static-element-interactions': [
173
- 'error',
174
- {
175
- handlers: [
176
- 'onClick',
177
- 'onMouseDown',
178
- 'onMouseUp',
179
- 'onKeyPress',
180
- 'onKeyDown',
181
- 'onKeyUp',
182
- ],
183
- },
184
- ],
185
-
186
- // A non-interactive element does not support event handlers (mouse and key handlers)
187
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md
188
- 'jsx-a11y/no-noninteractive-element-interactions': [
189
- 'error',
190
- {
191
- handlers: [
192
- 'onClick',
193
- 'onMouseDown',
194
- 'onMouseUp',
195
- 'onKeyPress',
196
- 'onKeyDown',
197
- 'onKeyUp',
198
- ],
199
- },
200
- ],
201
-
202
- // ensure emoji are accessible
203
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md
204
- 'jsx-a11y/accessible-emoji': 'error',
205
-
206
- // elements with aria-activedescendant must be tabbable
207
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md
208
- 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
209
-
210
- // ensure iframe elements have a unique title
211
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md
212
- 'jsx-a11y/iframe-has-title': 'error',
213
-
214
- // prohibit autoFocus prop
215
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md
216
- 'jsx-a11y/no-autofocus': [ 'error', { ignoreNonDOM: true } ],
217
-
218
- // ensure HTML elements do not specify redundant ARIA roles
219
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
220
- 'jsx-a11y/no-redundant-roles': 'error',
221
-
222
- // media elements must have captions
223
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md
224
- 'jsx-a11y/media-has-caption': [
225
- 'error',
226
- {
227
- audio: [],
228
- video: [],
229
- track: [],
230
- },
231
- ],
232
-
233
- // WAI-ARIA roles should not be used to convert an interactive element to non-interactive
234
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md
235
- 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
236
- 'error',
237
- {
238
- tr: [ 'none', 'presentation' ],
239
- },
240
- ],
241
-
242
- // WAI-ARIA roles should not be used to convert a non-interactive element to interactive
243
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md
244
- 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
245
- 'error',
246
- {
247
- ul: [ 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid' ],
248
- ol: [ 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid' ],
249
- li: [ 'menuitem', 'option', 'row', 'tab', 'treeitem' ],
250
- table: [ 'grid' ],
251
- td: [ 'gridcell' ],
252
- },
253
- ],
254
-
255
- // Tab key navigation should be limited to elements on the page that can be interacted with.
256
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md
257
- 'jsx-a11y/no-noninteractive-tabindex': [
258
- 'error', {
259
- tags: [],
260
- roles: [ 'tabpanel' ],
261
- },
262
- ],
263
-
264
- // ensure <a> tags are valid
265
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md
266
- 'jsx-a11y/anchor-is-valid': [
267
- 'error',
268
- {
269
- components: [ 'Link' ],
270
- specialLink: [ 'to' ],
271
- aspects: [ 'noHref', 'invalidHref', 'preferButton' ],
272
- },
273
- ],
274
- },
275
- };
@@ -1,21 +0,0 @@
1
- module.exports = {
2
- plugins: [
3
- 'react-hooks',
4
- ],
5
-
6
- parserOptions: {
7
- ecmaFeatures: {
8
- jsx: true,
9
- },
10
- },
11
-
12
- rules: {
13
- // Enforce Rules of Hooks
14
- // https://github.com/facebook/react/blob/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
15
- 'react-hooks/rules-of-hooks': 'error',
16
-
17
- // Verify the list of the dependencies for Hooks like useEffect and similar
18
- // https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
19
- 'react-hooks/exhaustive-deps': 'error',
20
- },
21
- };